- 17 Dec, 2018 4 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Change Synchronized::copy copy-assignment overload: rename to `copy_into`, and take ref v.s. ptr. (Note: this ignores all push blocking failures!) Reviewed By: aary Differential Revision: D13475878 fbshipit-source-id: 4923a0cc73359853357dba60c6e4be654e92ce82
-
Yedidya Feldblum authored
Summary: [Folly] "Upgrade" wording in `Synchronized`. (Note: this ignores all push blocking failures!) Reviewed By: aary Differential Revision: D13484147 fbshipit-source-id: 5ccaac2de5e03986885000869a862d2a37ab5751
-
Aaryaman Sagar authored
Summary: The behavior of not allowing write locks on const methods is inconsistent, as there is no way of determining the semantics of the protected object. In particular there are two types of classes that come into mind here - Pointer and reference like classes. These can be const, but the underlying data item need not be const. Here it should be perfectly resaonable to allow users to acquire a write lock on a const Synchronized<> object - Types with mutable members. These can be write locked even when const, this behavior is probably okay. On the other hand the previous motivation of this diff - inconsistency with upgrade locks is being removed. They will no longer expose non-const access Reviewed By: yfeldblum Differential Revision: D13478631 fbshipit-source-id: 652a08c61abf35c3eadc45cedc5d300fbef83a6b
-
Andrii Grynenko authored
Summary: Introduce a coro::lambda helper which makes it safe to create coroutine lambdas with captures. Reviewed By: lewissbaker Differential Revision: D13473068 fbshipit-source-id: a1177b4d57715b10fc4398fa6626ee105a8a43ce
-
- 16 Dec, 2018 2 commits
-
-
Orvid King authored
Summary: The fd overload is going to be removed. Reviewed By: yfeldblum Differential Revision: D13478000 fbshipit-source-id: d45c5d7c0dbcbde31976ff5dc48d1abc97d5a743
-
Orvid King authored
Summary: It's dead. Reviewed By: yfeldblum Differential Revision: D13477847 fbshipit-source-id: 9ba568fe7070b337646e89790339dc6c35d0b86f
-
- 14 Dec, 2018 4 commits
-
-
David Goldblatt authored
Summary: This is a ReadMostlyMainPtr variant that allows racy accesses. By making the write-side slower, the read side can avoid any contended shared accesses or RMWs. Reviewed By: djwatson Differential Revision: D13413105 fbshipit-source-id: f03c7ad58be72b63549b145ed6f41c51563831d1
-
Lee Howes authored
Summary: onError is to be phased out because: * It is weakly typed * (most seriously) It loses the executor and so terminates a via chain silently causing subsequent work to run in the wrong place onError is replaced with thenError which fixes both problems. This diff merely deprecates it to allow for a gentle phase out. Reviewed By: yfeldblum Differential Revision: D13418290 fbshipit-source-id: a0c5e65a97ed41de18d85ceab258417355a43139
-
Yedidya Feldblum authored
Summary: [Folly] Extract `FunctionTraitsSharedProxy`, deduplicating four nearly identical implementations. Differential Revision: D13461506 fbshipit-source-id: 2927dbe1629024cf778301c509b82711940a8099
-
Orvid King authored
Summary: No longer needed Reviewed By: djwatson Differential Revision: D13456759 fbshipit-source-id: ea08992d3bd4babbdcf326b0c01f64cd1184784f
-
- 13 Dec, 2018 2 commits
-
-
Uche Ozoemena authored
Summary: Clarify the [last section](https://github.com/facebook/folly#ubuntu-1604-lts) of the Ubuntu build instructions about where commands need to be run from and how to invoke `make install`. Fixes #847. Pull Request resolved: https://github.com/facebook/folly/pull/984 Reviewed By: Orvid Differential Revision: D13406491 Pulled By: yfeldblum fbshipit-source-id: d04121812d0d7394000ea6116745c236db67aa23
-
Yedidya Feldblum authored
Summary: [Folly] `aligned_storage_for`, `aligned_storage_for_t`. Reviewed By: aary Differential Revision: D13448822 fbshipit-source-id: 59a09951e0ff75f8b0aeb201a5c1eb28850ea91d
-
- 12 Dec, 2018 3 commits
-
-
Orvid King authored
Summary: It's dead... Hopefully... Reviewed By: yfeldblum Differential Revision: D13418381 fbshipit-source-id: 1d05aad80342d4f048ae37e90e9fc13d31676ddd
-
Songqiao Su authored
Reviewed By: mzlee Differential Revision: D13425495 fbshipit-source-id: 9955ae6d59b0604f1e106fef0f0fccca1093e5f4
-
Lee Howes authored
Summary: l-value Future::onError was deprecated but not deleted. This diff makes that final cleanup. Reviewed By: Orvid Differential Revision: D13419719 fbshipit-source-id: d763b75ab3351811f35ad880291426c153aefda9
-
- 11 Dec, 2018 6 commits
-
-
Andrii Grynenko authored
Summary: This allows avoiding extra executor/queueing operations if caller knows that task can be safely run inline. Reviewed By: yfeldblum Differential Revision: D13404703 fbshipit-source-id: 4aa71e59b48572671e8031ee7ea4dcd4e3a6138b
-
Songqiao Su authored
Summary: There could be cases that user want to record some of their own metrics during benchmark. This diff add another kinds of macro BENCHMARK_COUNTERS to make it happen, see Test plan for an example. One problem is that it would be hard to output the result on the fly. As it needs to run all benchmarks first to know which customized counter are used, then it can output the proper column headers. Reviewed By: yfeldblum Differential Revision: D9874668 fbshipit-source-id: 2004bb4484e54c1edd65763d1727486c6905d884
-
Andre Pinto authored
Summary: When BufferCallback::onEgressBuffered() is called, applications usually want to know how many bytes were buffered so that can take actions (such as avoiding that connection, failing fast, etc). This diff adds getTotalPendingBytes() to AsyncTransport to allow applications to easily query how many bytes were actually buffered. Reviewed By: spalamarchuk Differential Revision: D13252677 fbshipit-source-id: 8ec203f6764e00f52d471321afb549376397eb84
-
Dylan Yudaken authored
Summary: There is a bug in ElfFile using strncat which could cause buffer overflows when a previous file open failed. strncat only limits based on the src length, and so if strlen(dest) > 0 this could have overflowed. Reviewed By: anakryiko Differential Revision: D13398108 fbshipit-source-id: 793c35884f1e639f36758f36046158858fd5976a
-
Nitin Garg authored
Summary: The common use case for token buckets to implement resource usage throttling/smoothing also implies that callers need to either implement their own backoff+retry mechanism. The simple exponential backoff approach is prone to starvation and over-throttling (under-utilized resource). Many cases will simply be okay with being told at what point in future their allocations can be met effectively doing the starvation free FIFO scheduling for them. Added a consumeWithBorrow API to enable this behavior. Added checks in existing API to account for the possibility of the internal clock of the bucket being 'in future' wrt to the 'now' argument passed in the call. Also added an API to be able to return previously allocated tokens effectively moving the clock back on the bucket. This is largely for completeness and there isn't an immediate use case in mind for this. Reviewed By: yfeldblum, usumeet Differential Revision: D13166472 fbshipit-source-id: 4d6f93eedcc75eb07c1250026e57806c96974c96
-
Yedidya Feldblum authored
Summary: [Folly] Prefer `lift_unit_t<T>` in `lift_unit` call-sites over `typename lift_unit<T>::type`. (Note: this ignores all push blocking failures!) Reviewed By: andriigrynenko Differential Revision: D13410680 fbshipit-source-id: e51f16d31fc30bd2858f89a2b90271525f17706e
-
- 10 Dec, 2018 6 commits
-
-
Doron Roberts-Kedes authored
Summary: There was a problem with DeterministicSchedule when threads issued shared access stores/loads to atomics during thread local destructors. Thread local destructors run after a thread terminates, and therefore after all of the DSched cleanup work in beforeThreadExit() is already complete. The new DSched::joinAll() functions works around this problem by blocking the parent until all child threads are blocked at the end of beforeThreadExit(). The parent then lets each child thread proceed one at a time through the thread local destructor with a paired sem_post and .join(). Reviewed By: djwatson Differential Revision: D13381250 fbshipit-source-id: 80ab39b3f2f71ee69dfbaec9950dfc5908874353
-
Doron Roberts-Kedes authored
Summary: There are too many corner cases at the moment to redefine DeterministicAtomic as using BufferedAtomic, so add a 2nd one to allow test to transition over to BufferedAtomic on a case by case basis. Reviewed By: djwatson Differential Revision: D13379877 fbshipit-source-id: 76efdd4faedd6c5af13ab8507f41fb63b3e1c7f3
-
Andrii Grynenko authored
Summary: Pick some events from the NotificationQueue on every EventBase loop iteration if NotificationQueue is registered as an internal event and there are no other active events. Reviewed By: yfeldblum Differential Revision: D13393839 fbshipit-source-id: 9d281ac721db268f321860b1bf55d2afd79f9679
-
Lee Howes authored
Summary: Explicitly delete the value taking form of folly::Future::then. Redo of D13115198 Reviewed By: yfeldblum Differential Revision: D13396333 fbshipit-source-id: 36df474cab95577b68584099109d94069903090e
-
Yuntong Wang authored
Differential Revision: D13115198 Original commit changeset: a33246d23ccd fbshipit-source-id: 3bbd102ce166f5404f7181a1ca1c88c66d6b8ea6
-
Lee Howes authored
Summary: Explicitly delete the value taking form of folly::Future::then. Reviewed By: Orvid Differential Revision: D13115198 fbshipit-source-id: a33246d23ccde8a14d4d70de4f6e0373c006de11
-
- 08 Dec, 2018 2 commits
-
-
Krishna Kondaka authored
Summary: Original change to folly::json as part of D13038266/ was reverted due to performance regression in Android. This is modified version to keep track of lineNum while skipping white spaces. Reviewed By: yfeldblum Differential Revision: D13293197 fbshipit-source-id: 96d07946ae7430a182ff98f6dfd6d32e3a923991
-
Dan Melnic authored
Summary: Add support for EventBase::runInEventBaseThreadAlwaysEnqueue Reviewed By: yfeldblum Differential Revision: D13366773 fbshipit-source-id: 72eacdbe699509d771fcefe31ee4d742eaadd4d1
-
- 07 Dec, 2018 7 commits
-
-
Petr Lapukhov authored
Summary: Mutate supplied object in place in accordance with patch instructions. If patch fails, object may be left in partially modified state. Notice that patch application is placed in json_patch as we rely on dynamic object to store the patch itself. Reviewed By: yfeldblum Differential Revision: D10427475 fbshipit-source-id: 9ebc927c31fdf7434e69cb5c8df01c6979cab6e0
-
Petr Lapukhov authored
Summary: Previously `get_ptr(json_pointer const&)` would return nullptr or throw. The new try_get_ptr version provides richer facilities: points which token caused resolution error, if any, and also provides pointer to last-known properly resolved element. This allows, for example, implementing append logic with pointers like "/foo/bar/-" if "bar" is an array. The error would return `dynamic*` for the array, allowing caller to immediately perform push operation. Consequently, the get_ptr() is now implemented in terms of `try_get_ptr`. Reviewed By: yfeldblum Differential Revision: D10098092 fbshipit-source-id: 620996a66823be661d64d39661837cedf3c24493
-
Petr Lapukhov authored
Summary: We have insert() API for underlying object, but not the array. With array, insert() has same semantic as in std::vector, shifting elements to the right. To insert at arbitrary offset use something like `arr.insert(arr.begin() + 10, elem)`; This calls one of specializations of std::vector's insert() underneath. Reviewed By: yfeldblum Differential Revision: D10372068 fbshipit-source-id: 54bb7ea80b36bf1b893d88b82a11afa08ad0c0e2
-
Yedidya Feldblum authored
Summary: Pull Request resolved: https://github.com/facebook/folly/pull/981 Reviewed By: Orvid Differential Revision: D13374621 Pulled By: yfeldblum fbshipit-source-id: 00665529250cd03d9ca02f72f36efe505c280aa3
-
Alexander Zhavnerchik authored
Summary: This serves two purposes: * unify API to be similar to folly::Optional * allow to pass snapshot into the getter, so snapshoted value can be fetched for that setting. Reviewed By: alikhtarov Differential Revision: D13116589 fbshipit-source-id: e46ac1a733d0d947f2a63f25e90deba31c03223b
-
Yedidya Feldblum authored
Summary: Pull Request resolved: https://github.com/facebook/folly/pull/979 Reviewed By: Orvid Differential Revision: D13368681 Pulled By: yfeldblum fbshipit-source-id: 56c18633ddd029ee499940ce5c8b8ad2cbef4ea7
-
Leo Andrade authored
Summary: Fixing minor typo in comment for initlist_construct_t. Reviewed By: yfeldblum Differential Revision: D13356226 fbshipit-source-id: b888c736877c57fa196bf98af87ec0473f6895f5
-
- 06 Dec, 2018 4 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Let `SingletonThreadLocal::accessAllThreads` give the right type. Reviewed By: andriigrynenko Differential Revision: D10474930 fbshipit-source-id: 3fbe2e8ef6ace7d40d774f66b830ae40d810ef9d
-
Andrii Grynenko authored
Summary: RequestContext::setContext is only meant to be used internally. Reviewed By: yfeldblum Differential Revision: D13352499 fbshipit-source-id: 6837186a5eaf0e9ad53cead73c5957a17bbb82bd
-
Dan Melnic authored
Summary: Avoid UB by using an std::atomic<FatalSignalCallbackRegistry*> Reviewed By: yfeldblum Differential Revision: D13359882 fbshipit-source-id: 02f5f758bd0ba0c6201a384b993dafcfa7ab4546
-
Dan Melnic authored
Summary: Fix gFatalSignalCallbackRegistry SIOF issue Reviewed By: yfeldblum Differential Revision: D13317694 fbshipit-source-id: a828901dd42841b83a464ae759b7461b7d8fdca1
-