- 28 Aug, 2019 5 commits
-
-
Dan Melnic authored
Summary: Use FOLLY_CL_USE_FOLLY_TLS for CacheLocality to avoid an iOS build issue Reviewed By: mzlee Differential Revision: D17085507 fbshipit-source-id: acd407c9e0045eb4d8a59348a20874dbe75fd651
-
Lee Howes authored
Summary: Earlier change to duration waiting broke propagation of the interrupt handler. This change correctly propagates it into the new future that is returned. Reviewed By: yfeldblum Differential Revision: D17061618 fbshipit-source-id: b228221acbfab3ae94118c1197a485e01aa2e41e
-
Lee Howes authored
Summary: whileDo is hard to use with SemiFutures, leading to potential use of inline executors just to make it work. This adds native support. Reviewed By: yfeldblum Differential Revision: D16988569 fbshipit-source-id: abaf36180d6ff8a5277eebb277f7f0a254315d36
-
Alex Eckert authored
Summary: All of the requisite headers are now open sourced and eden has been converted to use them. This removes any logic that references this directory and kills the now unused cmake file. Reviewed By: chadaustin Differential Revision: D16994732 fbshipit-source-id: 573b8b50540ee64590682be2a54aa94659f12368
-
Alex Eckert authored
Summary: Most stat code in fbcode was moved in to open source under fbcode/fb303. The only exception that we use internally is the MonotonicCounter class. This diff moves all of our stats code to use the open source headers and updates cmake files to pull in the open source fb303. Reviewed By: chadaustin, shri-khare Differential Revision: D16969960 fbshipit-source-id: 12b7abb54c956c242c8e27eb69fd96925c7e61f7
-
- 27 Aug, 2019 3 commits
-
-
Orvid King authored
Summary: Latest and C++17 are all we currently intend to support. Created from Diffusion's 'Open in Editor' feature. Reviewed By: yfeldblum Differential Revision: D17053747 fbshipit-source-id: 7ef2404b82242e363c9ccf1c5d7136eb52f356dc
-
Lee Howes authored
Summary: In preparation for making TimeKeeper::at and TimeKeeper::after return SemiFutures to make more explicit the need to keep work off of the TimeKeeper's executor, add *Unsafe versions of both functions to migrate code to. Differential Revision: D17052948 fbshipit-source-id: 4fb138862e417f02746ad4eaf71f091d37302e7a
-
Ying Hu authored
Summary: Fixing a comment in Evicting Cache Map, no functional code change. (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum Differential Revision: D17051293 fbshipit-source-id: 7a1197790bd9a0905934888dabeecde9f7c9c165
-
- 26 Aug, 2019 5 commits
-
-
Adam Simpkins authored
Summary: Update add_thrift_cpp2_library() to add a PUBLIC_HEADER property to the generated library target, so that the generated headers can be installed using an `install()` call. Also add a `HEADER_INSTALL_DIR` property which indicates the directory they should be installed into. A `INCLUDE_DIR` argument was added to customize the include installation path, should anyone care to do so. This also removes code that was previously incorrectly installing the generated headers into the source tree. Reviewed By: wez Differential Revision: D16853404 fbshipit-source-id: 6f640b2bd347c99804e074fca0209dda37c8a9cf
-
László Várady authored
Summary: `folly::detail::std_pmr` uses either `std::pmr` or `std::experimental::pmr`. "Polymorphic Memory Resources" has been standardized in C++17, but `pmr::resource_adaptor` was [left behind](https://github.com/cplusplus/papers/issues/33), which means `resource_adaptor` is not available when a C++17 ready standard library is detected by folly. This commit reimplements `test_resource` without using the non-standard adaptor. ``` folly/test/sorted_vector_test.cpp:862:31: error: ‘folly::detail::std_pmr::resource_adaptor’ has not been declared 862 | using folly::detail::std_pmr::resource_adaptor; | ^~~~~~~~~~~~~~~~ ``` Pull Request resolved: https://github.com/facebook/folly/pull/1207 Reviewed By: nbronson Differential Revision: D17003049 Pulled By: yfeldblum fbshipit-source-id: 7bcd5b4bb4368366cd57d89b9ef88deaaff808d6
-
Tristan Rice authored
Summary: Previous within changes changed how long the executor keepalive existed for. This explicitly grabs the executor keepalive before calling within to ensure it still exists when we try to use it in `via`. Reviewed By: LeeHowes Differential Revision: D17054622 fbshipit-source-id: 7826c6ac0ad332a8f5f1331cd2d798619cf318c3
-
Adam Simpkins authored
Summary: The external Travis CI builds for fbzmq are still using the older fbcode_builder spec (as opposed to the newer getdeps manifest file). D16577367 moved the CMakeLists.txt file to the top-level directory, but the fbzmq spec file was still looking for it in the fbzmq subdirectory. Reviewed By: jstrizich Differential Revision: D17005361 fbshipit-source-id: 3f7664eadfb60ec7606124a14445b44ae586b8a7
-
Adam Simpkins authored
Summary: Fix the fbzmq pathmap listed in its manifest file to match the path map actually used by ShipIt. The fact that this was broken was why internal getdeps builds did not detect that D16577367 broke the build. Reviewed By: wez, jstrizich Differential Revision: D17005360 fbshipit-source-id: 046ff58ad70c03b860c3fccebaba975808df244d
-
- 25 Aug, 2019 4 commits
-
-
Adam Simpkins authored
Summary: Update ThriftCppLibrary.cmake to record that the output depends on the thrift `cpp2` template files. The `THRIFT_TEMPLATE_FILES` variable was defined in D16062657 but doesn't appear to be used anywhere. This uses it, and also updates it to only match the C++ template files. Reviewed By: wez Differential Revision: D16738442 fbshipit-source-id: aa4097e9ec1d009ef1e3ee2efd03ffa19a82ed12
-
Adam Simpkins authored
Summary: Add explicit double quotes around arguments that are intended to be exactly a single parameter. Also line wrap to 80 characters. Reviewed By: wez Differential Revision: D16738443 fbshipit-source-id: b8c9b6d50da72b44e23eaf5effbc384b6cbbc1c0
-
Adam Simpkins authored
Summary: Change ThriftCppLibrary to use `fb_cmake_parse_args()` This code doesn't really care much about handling empty arguments, so we could use the standard `cmake_parse_arguments()` function here instead of `fb_cmake_parse_args()`. However, it is slightly more convenient that `fb_cmake_parse_args()` automatically errors out on unhandled arguments, so that we don't have to check for this ourselves. Reviewed By: wez Differential Revision: D16738445 fbshipit-source-id: 67b9761f2ceaf7665bd336290bb44af32fec6f4a
-
Adam Simpkins authored
Summary: The manifest file for iproute2 previously listed the commit to check out as 7ca63aef7d1b0c808da0040c6b366ef7a61f38c1. However, this is not a commit, but a tag object that refers to commit 92a0236a3cdf3438000834121b7ea8a09f1f52b1. This caused getdeps to think that iproute2 was always out-of-date, even when it was already on the correct commit, since it was comparing current commit ID against the tag ID. This updates the manifest to refer to the commit ID instead of the tag ID. Reviewed By: shri-khare Differential Revision: D17005418 fbshipit-source-id: c7145c73b66ae93a2e9097ddcf8c53237b135d32
-
- 24 Aug, 2019 2 commits
-
-
Dan Melnic authored
Summary: Enable FOLLY_TLS on FOLLY_MOBILE too Reviewed By: guangyfb Differential Revision: D16883165 fbshipit-source-id: 1a8f0991088f6963dc2acf84b74b294be998b877
-
Yedidya Feldblum authored
Summary: [Folly] Avoid `__forceinline` for `catch_exception` under MSVC, which warns about functions which contain `try`-and-`catch` blcoks having the `__forceinline` modifier. Reviewed By: akrieger Differential Revision: D16982707 fbshipit-source-id: 68c443c4ce8ca77edd49d509a88ef4b0ab9488a9
-
- 23 Aug, 2019 4 commits
-
-
Aaryaman Sagar authored
Summary: The definition of RLockedPtr should use a non-const Subclass type, and not a const one. Reviewed By: ot Differential Revision: D15356827 fbshipit-source-id: b8ad41e263f0e15ffa25b0698aa85eab8ca2ccb8
-
Tristan Rice authored
Summary: This moves within to be in a more logical spot. In the parent diff we kept it where it was to make it easier to see the differences. Reviewed By: LeeHowes Differential Revision: D16967106 fbshipit-source-id: 9f9cd2ea38a996ac12d3ca8256c1ec050d57dfc0
-
Tristan Rice authored
Summary: This fixes a deadlock bug where the after continuation runs inline. We resolve this by using defer to delay execution until both futures are created thus avoiding any extra synchronization. Reviewed By: LeeHowes Differential Revision: D16952748 fbshipit-source-id: a88a40d3135bdabc43bb51f9b5ea072f8e6564a3
-
Joe Romano authored
Summary: `ConcurrentHashMap::insert_or_assign` does not follow the interface for `std::map::insert_or_assign`. Making this clear for future users to avoid confusion. Code: ``` int main(int argc, char** argv) { folly::ConcurrentHashMap<int, std::string> map; std::cout << "Insertion took place?: " << map.insert_or_assign(1, "hey").second << std::endl; std::cout << "Insertion took place?: " << map.insert_or_assign(0, "wow").second << std::endl; std::cout << "Insertion took place?: " << map.insert_or_assign(1, "wow").second << std::endl; } ``` Output: ``` Insertion took place?: 1 Insertion took place?: 1 Insertion took place?: 1 ``` Also see: https://github.com/facebook/folly/blob/master/folly/concurrency/test/ConcurrentHashMapTest.cpp#L86-L87 Reviewed By: magedm Differential Revision: D16967939 fbshipit-source-id: ce0d32813371b31a94e14e404665d4fb2e7ffdfe
-
- 22 Aug, 2019 6 commits
-
-
Lewis Baker authored
Summary: Adds folly::coro::sleep() function as an alternative to using folly::futures::sleep(). The coro version returns a Task<void> and supports cancellation of the sleep operation when awaited within another Task. Reviewed By: kirkshoop Differential Revision: D16816328 fbshipit-source-id: 46bc4ee2475e6bd0bdfd0f7f30f3e0f1ea54d4d5
-
Lewis Baker authored
Summary: The `folly::coro::Task` coroutine type now has an associated `CancellationToken` that is implicitly passed down to child operations that it awaits. This is a first step towards supporting cancellation of persistent async streams. This adds a new `co_withCancellation()` customisation point that awaitable types can customise to allow them to opt-in to cancellation. Currently only `Task` customises this operation. Also provided a new `co_current_cancellation_token` object that can be awaited within a `Task` to retrieve the current `CancellationToken`. Note that I have not yet hooked up the `Future` or `SemiFuture` to integrate with this cancellation mechanism (most `Future`-based code is not cancellation-aware). So a coroutine that is currently suspended awaiting for a `Future` may not currently respond to a cancellation request. Reviewed By: andriigrynenko Differential Revision: D16610810 fbshipit-source-id: 72a31d7a3ba4c281db54c1942ab41d4ea2f34d21
-
Giuseppe Ottaviano authored
Summary: `LockFlags` is a set of flags that mirrors `mlock2(..., int flags)`, but since this is not a C API we don't need a bitset, we can just use a more idiomatic struct of bools (also used for the other options in the class). Furthermore, having an entry with value 0 (`LOCK_PREFAULT`) does not make sense in a bitset. Reviewed By: yfeldblum Differential Revision: D16900127 fbshipit-source-id: 6477854121c0626e0f36cb7a50d50df73323bd4e
-
Wez Furlong authored
Summary: This simplifies things for the OSS CI situation in the short term, especially since Eden isn't quite buildable or usable outside FB at this time. Reviewed By: chadaustin Differential Revision: D16953346 fbshipit-source-id: 028150bb3cfc9a8ccbe1197321214b56ad359463
-
Yedidya Feldblum authored
Summary: [Folly] Drop workaround for clang-3.6 in `Range` ctor. Reviewed By: gkmhub, Orvid Differential Revision: D16945307 fbshipit-source-id: d70d7560375d0c020b19fbac227767605459a834
-
Rosen Penev authored
Summary: bzero is deprecated and can be compile time disabled for uClibc-ng Pull Request resolved: https://github.com/facebook/folly/pull/1195 Reviewed By: Orvid Differential Revision: D16451837 Pulled By: yfeldblum fbshipit-source-id: 929a8e8cd7f8ddb3a904c1b1956a5f8ca115244f
-
- 21 Aug, 2019 7 commits
-
-
Lewis Baker authored
Summary: Simplified the interface for consuming an AsyncGenerator to now just have a single async next() method instead of an iterator-based API. The iterator-based API was added to integrate with the 'for co_await' syntax present in the Coroutines TS, however this syntax has been removed from C++20 to allow for future exploration of the AsyncRanges design-space. The `co_await gen.next()` expression produces an optional-like object that lets you query whether the result is a sentinel or contains a value. Old: ``` Task<void> consume(AsyncGenerator<T> gen) { for (auto it = co_await gen.begin(); it != gen.end(); co_await ++it) { use(*it); } } ``` New: ``` Task<void> consume(AsyncGenerator<T> gen) { while (auto item = co_await gen.next()) { use(*item); } } ``` Reviewed By: andriigrynenko, kirkshoop Differential Revision: D16586151 fbshipit-source-id: 4b0bf31ba9291d894a18e9553513eddee0cde33a
-
Amir Livneh authored
Reviewed By: Orvid Differential Revision: D16640245 fbshipit-source-id: 3a184e4d877ea27a9400de5993b494095f6bd5e5
-
Luca Niccolini authored
Summary: does not affect the github build. this is for fb CI Reviewed By: dddmello Differential Revision: D16935982 fbshipit-source-id: 61656fa600f19438b5aa89486486ed4ee103dea4
-
Aaryaman Sagar authored
Summary: folly::Hash did not work with pointer-like types like std::unique_ptr<T>, std::shared_ptr<T> and T*. Add specializations for those Reviewed By: yfeldblum Differential Revision: D16134842 fbshipit-source-id: 78d3cf9c6f5ef4f49b008c0d1c489d3c6203ba89
-
Michael Lee authored
Summary: As far as I can tell, folly/test/FBVectorTestUtil.h does not need to include folly/Benchmark.h. Move it to folly/testFBVectorBenchmark where it is actually used. Reviewed By: yfeldblum Differential Revision: D16931137 fbshipit-source-id: 8ef5f99a783537672d55883adadd08270e318a61
-
Dan Melnic authored
Summary: Fix : iterating through ConcurrentHashMapSIMD results in infinite loop Reviewed By: nbronson Differential Revision: D16923826 fbshipit-source-id: c8b98ef13034240c162c155cf0e5c3f097b73c7f
-
Elliott Clark authored
Summary: Underflow/overflow of signed integers is fraught with dangers. So this diff removes the potential for overflow while adding or subtracting buckets in folly stats. Reviewed By: yfeldblum Differential Revision: D16898755 fbshipit-source-id: 4d3df1024b4c01ea0b276278105071e62e27fa27
-
- 20 Aug, 2019 4 commits
-
-
Wez Furlong authored
Summary: In the Facebook infrastructure the testpilot runner talks to a service to determine whether a given test should be run locally. The remote service was returning an error for some tests because they didn't have enough configuration specified. This diff associates some configuration with the tests based on the host type and makes things happier. Reviewed By: Ben0mega Differential Revision: D16894682 fbshipit-source-id: b6f59b112991160ef26cc126e98041d8908a6273
-
Nathan Bronson authored
Summary: Sized deallocation via ::operator delete with size == 0 is broken in some allocators. This diff adds a unit test that ensures we are either disabling sized deallocator or running with a good allocator. Reviewed By: interwq Differential Revision: D10857654 fbshipit-source-id: 981c7bcc1b021d4cd1ea1725ccf510d1958842fd
-
Ming Zhao authored
Reviewed By: pixelb Differential Revision: D15301144 fbshipit-source-id: f94a805427b6fc8b20e7c01fcf6e1853fbebf7f1
-
Victor Zverovich authored
Summary: Make `AsyncServerSocket` not fail on `EINPROGRESS` in `bind` and fix handling of `errno` there. Reviewed By: yfeldblum Differential Revision: D16791566 fbshipit-source-id: 1aeaefb6bae47bf41fd2d20238b716b84d0566d1
-