- 07 Dec, 2018 4 commits
-
-
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
-
- 05 Dec, 2018 4 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Allow `StringPiece` construction from `string` with custom allocator. Reviewed By: nbronson Differential Revision: D9494207 fbshipit-source-id: 22b6beb7e5718f69aa283431ad49dd36295e0825
-
Yedidya Feldblum authored
Summary: [Folly] Let `SingletonHolder` impl be class member type v.s. function local type, which for arbitrary magical reasons improves rtti/debuginfo letting the debugger see the type exactly. Could also be done by extracting `SingletonHolderImpl` as a top-level type, but that would require an additional `friend` declaration and class member type works. Reviewed By: pixelb Differential Revision: D13333184 fbshipit-source-id: 7de4f8c16706acb18c6869b5dcd0b9c6952efc46
-
Yedidya Feldblum authored
Summary: [Folly] Fix ordering between `FOLLY_HAS_EXCEPTIONS` and `kHasExceptions` definitions. Reviewed By: swolchok Differential Revision: D13338301 fbshipit-source-id: 855dbf7ba42eb118f84ffb84d2520c7dfc49cf39
-
Phil Willoughby authored
Summary: Prints StringPiece/FixedString/fbstring like a string and not like a vector of char when implicitly printed by googletest/googlemock. The order of printing precedence within googletest is: * ADL `PrintTo(T const&, ostream*)` * Gtest's container-printer for anything that looks like a container * ADL `ostream& operator<<(ostream&, T const&)` Unfortunately you need to include the <folly/test/TestUtils.h> header in every test to have this functionality. The googletest mechanism for overloading this means we can't do it in the main headers without introducing a dependency from them to googletest. Reviewed By: yfeldblum, luciang Differential Revision: D13306040 fbshipit-source-id: 4e8252d377835dad04625d84a0cae7c0713ce8af
-
- 04 Dec, 2018 5 commits
-
-
Dan Melnic authored
Summary: Fix broken opt build due to unused var warning Reviewed By: yfeldblum Differential Revision: D13317777 fbshipit-source-id: 9e4928558e0514bdb5ab21e78b026c5c1a44a380
-
Nathan Bronson authored
Summary: F14FastMap heuristically selects either F14ValueMap or F14VectorMap at compile time (same for F14FastSet). F14VectorMap has stronger iteration guarantees than the other unordered associative containers, including providing a reverse iterator. This diff refactors F14FastMap so that even when it uses the same policy as F14VectorMap it doesn't expose these additional guarantees. This is a precursor to extending FOLLY_F14_PERTURB_INSERTION_ORDER to all F14FastMap and F14FastSet. Reviewed By: yfeldblum Differential Revision: D13303823 fbshipit-source-id: 5feea3d1f8cb809ceb2c4f79a7cc1bc7e447768f
-
Andrii Grynenko authored
Summary: If observer generator function returned the same shared_ptr it's safe to not propagate such an update. Reviewed By: yfeldblum Differential Revision: D13249675 fbshipit-source-id: 334c33e791b664eaec3c2698009f138bef04f8a6
-
Greg McGary authored
Summary: Support disabling x86 static tracepoints. Reviewed By: yfeldblum Differential Revision: D13293303 fbshipit-source-id: e8578ee1d855aaf33eeacbc1e804608ab65449d5
-
Rachana Nandan authored
Summary: add an api in AsyncUDPServerSocket, to enable Address reuse Reviewed By: udippant Differential Revision: D13306371 fbshipit-source-id: ac19a89af5694b181fcd7639a5d566684c2adc92
-
- 03 Dec, 2018 5 commits
-
-
Krishna Kondaka authored
Differential Revision: D13038266 Original commit changeset: b424690c50f0 fbshipit-source-id: 600452535acf1251ed5d35845244ebdfcc63b11f
-
Nathan Bronson authored
Summary: This diff restores FOLLY_F14_PERTURB_INSERTION_ORDER to its default value of folly::kIsDebug. Reviewed By: shixiao Differential Revision: D13292523 fbshipit-source-id: 2304014131ea2996fa917d899dc169fe25f8ec8c
-
Scott Wolchok authored
Summary: Straightforward support for -fno-exceptions. Reviewed By: yfeldblum Differential Revision: D13289825 fbshipit-source-id: 4de867a77c758ce8a388fc8e0c85c296e86f3251
-
Yedidya Feldblum authored
Summary: [Folly] Remove unnecessary verbosity in `DefaultMake`. The shorter version does just as well. Reviewed By: andriigrynenko Differential Revision: D13254005 fbshipit-source-id: 6520b813685a4621d8679b7feda24a1a0b75cfd5
-
Nathan Bronson authored
Summary: This diff splits the gmock helpers out of JsonTestUtil.h into JsonMockUtil.h so that JsonTestUtil.h doesn't introduce a dependency on gmock that is problematic for some platforms. (Note: this ignores all push blocking failures!) Differential Revision: D13293728 fbshipit-source-id: 2a0e7f4a7c96fc05495b56fb02e848e92edc90d8
-
- 01 Dec, 2018 4 commits
-
-
Nathan Bronson authored
Summary: This diff defaults FOLLY_F14_PERTURB_INSERTION_ORDER to off even for debug builds. It will be reenabled soon. Reviewed By: markw65 Differential Revision: D13289756 fbshipit-source-id: 931f373e5633fa641360da7af51b5d6e64a5b39b
-
Andrew Gallagher authored
Reviewed By: yfeldblum Differential Revision: D13279970 fbshipit-source-id: 78b325029878c1ff5fb2e1c59d5765121818b55b
-
Yedidya Feldblum authored
Summary: [Folly] Enforce `SingletonThreadLocal` uniqueness per type and tag. Forbid duplicate uses with differing make/tltag. Reviewed By: andriigrynenko Differential Revision: D13213730 fbshipit-source-id: f051ac10667ee394545b56816646a721a68e33e5
-
Yedidya Feldblum authored
Summary: [folly] Support `-fno-exceptions` in `folly/dynamic.h` and in its dependencies. Reviewed By: Orvid Differential Revision: D13018170 fbshipit-source-id: 4d16049821f3a8628d63ee20f412c4df3dcee37e
-
- 30 Nov, 2018 4 commits
-
-
Subodh Iyengar authored
Summary: A default value of true for SO_REUSEADDR is dangerous. SO_REUSEADDR has several issues. For example if SO_REUSEADDR is used to bind to a socket which is already bound but not connected, the kernel will allow this operation to complete. This can cause overlapping data. https://www.spinics.net/lists/netdev/msg206437.html Looking at use cases of AsyncUDPSocket it does not look like people depend on this behavior of AsyncUDPSocket and this was first introduced in thrift for no reason. This changes the behavior back to false. Reviewed By: yfeldblum, djwatson Differential Revision: D13274704 fbshipit-source-id: 391cf1bdd3f633bee38c230fcd9f1403ea950c3b
-
Nathan Bronson authored
Summary: It's easy to accidentally rely on the relationship between insert and iteration order in unordered containers. This diff adds some randomization to the insertion order within an F14 chunk when compiled in debug mode. This isn't full randomization of the order, but is enough to break tests that rely on the iteration order of F14 maps and sets as small as two elements. This diff applies randomization to folly::dynamic object, F14NodeSet, F14NodeMap, F14ValueSet, F14ValueMap, F14FastSet for small (< 24 bytes) value_type, and F14FastSet for small value_type. The long-term plan is to randomize insertion order for all F14FastSet and F14FastMap, leaving iteration order deterministic only for explicit uses of F14VectorSet and F14VectorMap. Reviewed By: yfeldblum Differential Revision: D13099681 fbshipit-source-id: 35b3174a8afbc6cef27d2080adc5a01e85154dcd
-
Doron Roberts-Kedes authored
Summary: Mimic the atomic history buffers in relacy. This diff allows older values for atomics to be returned as long as the memory model is respected. Enforce the memory model with vector clocks (ThreadTimestamps). Depends on D10418223 Reviewed By: djwatson Differential Revision: D10418450 fbshipit-source-id: 0556259e96d512030ff9924bbd5aa0f79a38dfff
-
Nathan Bronson authored
Summary: In most cases two implicit conversions can be chained to perform an explicit construction, but that is not the case when the intermediate type has a template parameter that can't be deduced. This interferes with heterogeneous lookup when the transparent hasher or equality functor work by implicit conversion to a base type (like folly::Range). This diff disables heteregeneous find in cases where the hash functor or equality functor are not invocable. Reviewed By: yfeldblum Differential Revision: D13264397 fbshipit-source-id: 082c3215e81ab58f3fa9519da872642e45b16245
-
- 29 Nov, 2018 10 commits
-
-
Scott Wolchok authored
Summary: No need for String to import fbvector. Reviewed By: yfeldblum Differential Revision: D13007715 fbshipit-source-id: c61639a04273f14dd3daf230ee6ed9ade93d058e
-
Nathan Bronson authored
Summary: This diff fixes a few rough edges in the folly::sorted_vector_set and folly::sorted_vector_map APIs. It makes the default constructor implicit; it adds emplace to sorted_vector_set; and it adds bulk insertion via std::initializer_list to sorted_vector_set and sorted_vector_map. This doesn't fix all incompatibilities. It also changes sorted_vector_set and sorted_vector_map insertion so that they do not copy a value_type const& argument if the key is already in the container. Reviewed By: yfeldblum Differential Revision: D13255279 fbshipit-source-id: dc5a16ea729e2a32a77f82ec0eacaeaf7854cd1a
-
Andrii Grynenko authored
Summary: onError destroys the Core, which holds a Executor::KeepAlive, so we have to capture it before calling onError. Differential Revision: D13250857 fbshipit-source-id: 5f458765f0b8ccb225502c26413ff7bfdd46fe15
-
Nathan Bronson authored
Summary: Add static casts near memcpy to silence a compiler warning for a memcpy call site whose control flow is correctly guarded by the appropriate type_traits check. Reviewed By: yfeldblum, shixiao Differential Revision: D13241617 fbshipit-source-id: 747b6cd1bb32c0971e805d1a4a9cdc5da6c73ea9
-
Yedidya Feldblum authored
Summary: [Folly] Extract `getSingletonStackTrace` to its own detail library. For now, just do conditional definition, avoiding the atomic and the global constructor. Reviewed By: andriigrynenko Differential Revision: D13213446 fbshipit-source-id: 95af5701d1c29e0ef24ba48e9bcec9ec565b31b4
-
Yedidya Feldblum authored
Summary: [Folly] Let `SingletonThreadLocal` creator return derived type. This is a different interface for the creator type, and means supporting non-moveable/non-copyable types with an extra pointer indirection pre-C++17. Reviewed By: andriigrynenko Differential Revision: D13165769 fbshipit-source-id: 39f2b5fed48342dd3178a20838af50c43aabee86
-
Yedidya Feldblum authored
Summary: [Folly] Let `createGlobal` return a reference rather than a pointer, since it always returns non-`nullptr`. Reviewed By: andriigrynenko Differential Revision: D13116591 fbshipit-source-id: 5618c2e8a5a04b158ac45a3e43b02eb37c6af8c1
-
Yedidya Feldblum authored
Summary: [Folly] A small inline fast path for `StaticSingletonManager::create`. Reviewed By: andriigrynenko Differential Revision: D13114824 fbshipit-source-id: b72b6066b7ff5401e37e75aa1c8102e6536e9740
-
Yedidya Feldblum authored
Summary: [Folly] Remove `StaticSingletonManager` support for creator function. In general, derived types may be used instead. Reviewed By: andriigrynenko Differential Revision: D13114823 fbshipit-source-id: ecd781a1e11f1726e5e8689874e7f4473d21ecb0
-
Yedidya Feldblum authored
Summary: [Folly] Let `SingletonHolder` call createGlobal with no args. This was the only non-test call-site calling it with an argumnet. Reviewed By: andriigrynenko Differential Revision: D13114710 fbshipit-source-id: 55205a69d25966ee9fb09d5daefed1f9ecad80b9
-