- 17 Jan, 2019 2 commits
-
-
Andrii Grynenko authored
Reviewed By: lewissbaker Differential Revision: D13706612 fbshipit-source-id: a7c604dbb9216430cc30d63a7fe78530afad585c
-
Andrii Grynenko authored
Summary: After count_.store was done it's possible that the thread performing collect observed the value, and then it successfully decremented the counter to 0 and destroyed TLRefCount. The rest of the code in update method then couldn't safely assume that the TLRefCount object is still alive. This fixes collect to actually wait for update to complete (if we detect that we actually captured the new value written by such update). Reviewed By: davidtgoldblatt Differential Revision: D13696608 fbshipit-source-id: bd1a69ea3cc005b90ff481705fdffb83d8a9077a
-
- 16 Jan, 2019 6 commits
-
-
Stepan Palamarchuk authored
Summary: Currently, fibers library has its own class for managing timeouts - TimeoutController. It's optimized for the case when the set of timeouts is fixed and its size is not large. However, it's not efficient when that's not the case (see the benchmark). Since we're starting to use fibers in Thrift, we'll need to make sure that the underlying timeouts management is efficient for unbounded cases. This kills `TimeoutController` and switches FiberManager to use `HHWheelTimer` from the underlying LoopController (which is in general EventBase). One important note is that `HHWheelTimer` is **not exact** it rounds up timeouts to the 10ms boundary, so this **will slightly change the behavior**. The results of FibersBenchmark before & after: Before: ``` ============================================================================ folly/fibers/test/FibersBenchmark.cpp relative time/iter iters/s ============================================================================ FiberManagerCancelledTimeouts_Single_300 16.34ms 61.18 FiberManagerCancelledTimeouts_Five 17.54ms 57.00 FiberManagerCancelledTimeouts_TenThousand 252.06ms 3.97 ============================================================================ ``` After: ``` ============================================================================ folly/fibers/test/FibersBenchmark.cpp relative time/iter iters/s ============================================================================ FiberManagerCancelledTimeouts_Single_300 22.75ms 43.95 FiberManagerCancelledTimeouts_Five 21.12ms 47.34 FiberManagerCancelledTimeouts_TenThousand 19.13ms 52.27 ============================================================================ ``` This shows that with HHWheelTimer, throughput is unaffected by the number of different values used. Reviewed By: andriigrynenko Differential Revision: D13613830 fbshipit-source-id: 7b4662d308a9e1ef232672338a78b79efba46172
-
Nick Sukhanov authored
Summary: So it seems that my previous approach doesn't solve the issue completely, we are still seeing these errors, because std::numeric_limits<T>::epsilon() precision is not enough. We can do a different epsilon i.e 1e-6 but it will probably create other problems when values are very big or very small. I've read about how to do a proper comparison here: https://www.boost.org/doc/libs/1_66_0/libs/test/doc/html/boost_test/testing_tools/extended_comparison/floating_point/floating_points_comparison_theory.html but this seems to bee too complicated and slow to introduce relative error comparisons here. So I decided that we shouldn't do this comparison for floating types at all, because it doesn't make much sense, because we are trying to capture integer overflow with these guards. Example: "E0116 06:30:24.439344 3368082 Histogram.h:233] Called: lhs: 3.999999999999005240 rhs:4.000000000000000000 eps: 0.000000000000000222 diff: 0.000000000000994760" Reviewed By: yfeldblum Differential Revision: D13693535 fbshipit-source-id: e3e7dafa4517612c63bc8e22b62eeeb053677cb8
-
Joe Loser authored
Summary: - Folly no longer guarantees support for GCC 4.9. - It is only tested with GCC 5.1 or later, so update the `README` to reflect that. Pull Request resolved: https://github.com/facebook/folly/pull/997 Reviewed By: markisaa Differential Revision: D13648256 Pulled By: yfeldblum fbshipit-source-id: c694ea0af0c63bd4ec16eb2a8a3e2d95b5801f4d
-
Dan Melnic authored
Summary: Allocate the IOBuf object and the SharedInfo in a single memory allocation Reviewed By: yfeldblum, simpkins Differential Revision: D13580880 fbshipit-source-id: cde0eb48c00b9310d0540edb4a9c2d64d6f44a5d
-
Joe Loser authored
Summary: - Instead of wrapping a type trait with `_t` use the standard library's `_t` type trait variant. This is safe since Folly requires C++14, whereas previously the use of `_t` was supported prior to C++14. Pull Request resolved: https://github.com/facebook/folly/pull/994 Reviewed By: vitaut Differential Revision: D13634598 Pulled By: yfeldblum fbshipit-source-id: 09ed9fc1444f507b7422b690b36926cb57616e9e
-
David Goldblatt authored
Summary: Previously this was just a comment that we documented; but it's easy to check it directly. Reviewed By: yfeldblum Differential Revision: D13678337 fbshipit-source-id: 24990a732a2cc0019e90e294603bb8254a5cbc37
-
- 15 Jan, 2019 5 commits
-
-
Andrew Hall authored
Summary: Adds an accessor for the free function. Reviewed By: yfeldblum Differential Revision: D13648280 fbshipit-source-id: ca92054b88b27569d6afec2ed4d1bd68351857cc
-
Giuseppe Ottaviano authored
Summary: In some cases we want to prefetch the upper bits first. Reviewed By: philippv, luciang Differential Revision: D13663518 fbshipit-source-id: c69fe4740fb96f3e9d448410cdf9c4a6edbb6c30
-
Jason Fried authored
Summary: Add and assign to options bindings. Add a isReady to future bindings Reviewed By: yfeldblum Differential Revision: D13667465 fbshipit-source-id: 8522ef59d7d262cc13dc9f9940c37b7a0b65870c
-
Andrii Grynenko authored
Reviewed By: lewissbaker Differential Revision: D13658986 fbshipit-source-id: af03f4e2edea93371fc37773f2fea152f7c589f8
-
Yedidya Feldblum authored
Summary: [Folly] Exclude `folly/external/` from `clang-format`. Reviewed By: igorsugak Differential Revision: D13666741 fbshipit-source-id: cdf95ea85f7f21ca580888aa44983b1fb405fc09
-
- 14 Jan, 2019 15 commits
-
-
Andrii Grynenko authored
Reviewed By: lewissbaker Differential Revision: D13657174 fbshipit-source-id: afdda6abf02cb9e10b8696e1d81e9c2881521788
-
Lewis Baker authored
Summary: Adds a general-purpose CancellationToken abstraction that can be used to build APIs that allow the caller to pass in a CancellationToken that the caller can later use to communicate a request to cancel the operation. An operation can either poll for cancellation by calling the isCancellationRequested() method or can register for notification of a cancellation request by attaching a callback to the CancellationToken using the CancellationCallback class. The caller first constructs a CancellationSource, which allows them to request cancellation, and uses the CancellationSource to obtain CancellationToken objects which it can then pass into cancellable functions. This implementation is based on the reference implementation for the interrupt_token/stop_token abstraction proposed for C++20. ``` void polling_operation(folly::CancellationToken ct) { while (!ct.isCancellationRequested()) { do_work(); } } void blocking_operation(folly::CancellationToken ct) { folly::Baton baton; // Register a callback. folly::CancellationCallback cb{ct, [&] { baton.post(); }}; // Blocks until cancelled. baton.wait(); } void caller() { CancellationSource src; std::thread t1{ [&] { polling_operation(src.getToken()); } }; std::thread t2{ [&] { blocking_operation(src.getToken()); } }; std::this_thread::sleep_for(1s); src.requestCancellation(); t1.join(); t2.join(); } ``` Reviewed By: andriigrynenko Differential Revision: D10522066 fbshipit-source-id: 11ad3c104eda6650d11081485509981c9b1ea110
-
Nick Sukhanov authored
Summary: We were generating a lot of errors because of false positives when compare double. This diffs is an attempt to fix this introducing comparison with tolerance for floating types. Reviewed By: yfeldblum Differential Revision: D13639839 fbshipit-source-id: a81381384495c26ee176620a5f61b5c6109cf8b8
-
Nathan Bronson authored
Summary: This diff updates the unmodified checkin of farmhash in folly/external/farmhash to be compatible with the folly namespaces, build system, and unit tests, and exposes it via folly/hash/FarmHash.h. The primary entry point is the function folly::hash::farmhash::Hash. Changes to the original farmhash code have been kept as small as possible while still removing the tests from the main hash implementation; many opportunities for cleanup have been skipped. Reviewed By: yfeldblum Differential Revision: D13469230 fbshipit-source-id: 48dfe7d4e7d7f02ed5552b4e9e92dbad27592e45
-
Yedidya Feldblum authored
Summary: [Folly] Cut unused `sender_requires_from`. Addresses shadowing violation under gcc5. ``` folly/experimental/pushmi/o/extension_operators.h: In lambda function: folly/experimental/pushmi/o/extension_operators.h:236:381: error: declaration of 'auto:4 id' shadows a parameter [-Werror=shadow-local] folly/experimental/pushmi/o/extension_operators.h:236:227: note: shadowed declaration is here``` Reviewed By: kirkshoop Differential Revision: D13648907 fbshipit-source-id: 369bf3d0edce1065a5fe1dc2b1c20c7cdb25a0b4
-
Yedidya Feldblum authored
Summary: [Folly] Fix `folly/Poly-inl.h` under gcc8 with `-Wplacement-new`. ``` In file included from folly/Poly.h:1169, from folly/test/PolyTest.cpp:19: folly/Poly-inl.h: In instantiation of 'folly::detail::PolyVal<I>::PolyVal(T&&) [with T = {anonymous}::Big_t<int>; typename std::enable_if<folly::detail::ModelsInterface<T, I>::value, int>::type <anonymous> = 0; I = folly::poly::ISemiRegular]': folly/Poly.h:1131:34: required from here folly/Poly-inl.h:59:42: error: placement new constructing an object of type 'U' {aka '{anonymous}::Big_t<int>'} and size '40' in a region of type 'std::aligned_storage_t<16>' {aka 'std::aligned_storage<16, 16>::type'} and size '16' [-Werror=placement-new=] ``` Reviewed By: ericniebler Differential Revision: D13648512 fbshipit-source-id: 3076e7df1022dd4c3bdcc048edbfb30e8f6a99ed
-
Yedidya Feldblum authored
Summary: [Folly] Fix `folly/experimental/pushmi/` under gcc8 with `-Wshadow`. Reviewed By: ericniebler Differential Revision: D13648409 fbshipit-source-id: 2d46c3a5fa3587e954cb842c2207dceb01958008
-
Yedidya Feldblum authored
Summary: [Folly] Fix use-before-deduction in `folly/experimental/pushmi/` under gcc8. ``` folly/experimental/pushmi/test/FlowTest.cpp: In instantiation of 'ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens)::<lambda(auto:11)>::Data::Data(Stopper) [with auto:11 = folly::pushmi::flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >; MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; Stopper = <type error>]': folly/experimental/pushmi/test/FlowTest.cpp:165:34: required from 'ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)> [with auto:11 = folly::pushmi::flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >]' folly/experimental/pushmi/detail/functional.h:34:33: required by substitution of 'template<class F, class ... As> decltype ((F&&)(f)((As&(folly::pushmi::invoke_fn::operator()::as))...)) folly::pushmi::invoke_fn::operator()(F&&, As&& ...) const [with F = ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>&; As = {folly::pushmi::flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >}]' folly/experimental/pushmi/detail/functional.h:49:228: required by substitution of 'template<class C_> static constexpr decltype (folly::pushmi::concepts::detail::gcc_bugs((& C_::Requires_<<lambda(auto:11)>&, flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > > >))) folly::pushmi::InvocableConcept::Eval<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>&, folly::pushmi::flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > > >::impl<C_>(int) [with C_ = folly::pushmi::InvocableConcept]' folly/experimental/pushmi/detail/functional.h:49:649: required from 'constexpr folly::pushmi::InvocableConcept::Eval<F, Args>::operator bool() const [with F = ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>&; Args = {folly::pushmi::flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >}]' folly/experimental/pushmi/detail/functional.h:49:1400: required from 'constexpr const bool folly::pushmi::Invocable<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>&, folly::pushmi::flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > > >' folly/experimental/pushmi/flow_single_sender.h:148:82: [ skipping 10 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] folly/experimental/pushmi/detail/functional.h:34:33: required by substitution of 'template<class F, class ... As> decltype ((F&&)(f)((As&(folly::pushmi::invoke_fn::operator()::as))...)) folly::pushmi::invoke_fn::operator()(F&&, As&& ...) const [with F = folly::pushmi::detail::submit_fn::fn<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >&; As = {folly::pushmi::flow_single_sender<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>, folly::pushmi::trampolineEXF>&}]' folly/experimental/pushmi/detail/functional.h:49:228: required by substitution of 'template<class C_> static constexpr decltype (folly::pushmi::concepts::detail::gcc_bugs((& C_::Requires_<fn<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >&, flow_single_sender<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>, folly::pushmi::trampolineEXF>&>))) folly::pushmi::InvocableConcept::Eval<folly::pushmi::detail::submit_fn::fn<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >&, folly::pushmi::flow_single_sender<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>, folly::pushmi::trampolineEXF>&>::impl<C_>(int) [with C_ = folly::pushmi::InvocableConcept]' folly/experimental/pushmi/detail/functional.h:49:649: required from 'constexpr folly::pushmi::InvocableConcept::Eval<F, Args>::operator bool() const [with F = folly::pushmi::detail::submit_fn::fn<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >&; Args = {folly::pushmi::flow_single_sender<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>, folly::pushmi::trampolineEXF>&}]' folly/experimental/pushmi/detail/concept_def.h:485:12: required by substitution of 'template<class In, class Op, int (* _pushmi_concept_unique_25)[128], typename std::enable_if<(_pushmi_concept_unique_25 || (bool)((Sender<typename std::decay<_Tp>::type> && Invocable<Op&, In>))), int>::type <anonymous> > decltype(auto) folly::pushmi::operator|(In&&, Op) [with In = folly::pushmi::flow_single_sender<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>, folly::pushmi::trampolineEXF>&; Op = folly::pushmi::detail::submit_fn::fn<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >; int (* _pushmi_concept_unique_25)[128] = 0; typename std::enable_if<(_pushmi_concept_unique_25 || (bool)((Sender<typename std::decay<_Tp>::type> && Invocable<Op&, In>))), int>::type <anonymous> = 0]' folly/experimental/pushmi/test/FlowTest.cpp:208:7: required from 'void ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]' folly/experimental/pushmi/test/FlowTest.cpp:249:4: required from here folly/experimental/pushmi/test/FlowTest.cpp:160:39: error: use of 'tokens' before deduction of 'auto' ``` Reviewed By: ericniebler Differential Revision: D13648392 fbshipit-source-id: 6ad0b4f60704e6eb93417e347b4b081e2c230661
-
Yedidya Feldblum authored
Summary: [Folly] Fix `folly/experimental/pushmi` under gcc8 with `-Wmissing-braces`. ``` folly/experimental/pushmi/test/FlowManyTest.cpp: In member function 'virtual void FlowManySender_From_Test::TestBody()': folly/experimental/pushmi/test/FlowManyTest.cpp:294:44: error: missing braces around initializer for 'std::__array_traits<int, 5>::_Type' {aka 'int [5]'} [-Werror=missing-braces] folly/experimental/pushmi/test/PushmiTest.cpp: In member function 'virtual void FromIntManySender_TransformAndSubmit_Test::TestBody()': folly/experimental/pushmi/test/PushmiTest.cpp:160:34: error: missing braces around initializer for 'std::__array_traits<int, 3>::_Type' {aka 'int [3]'} [-Werror=missing-braces] ``` Reviewed By: ericniebler Differential Revision: D13648360 fbshipit-source-id: 3684d8fcc5549e91348942e94c0d2971fe50e4f6
-
Yedidya Feldblum authored
Summary: [Folly] Fix `folly/fibers/test/FibersTest.cpp` under gcc8 with `-Wshadow`. ``` folly/fibers/test/FibersTest.cpp: In lambda function: folly/fibers/test/FibersTest.cpp:1322:39: error: declaration of 'rctx' shadows a previous local [-Werror=shadow] folly/fibers/test/FibersTest.cpp:1320:37: note: shadowed declaration is here ``` Reviewed By: kirkshoop Differential Revision: D13648322 fbshipit-source-id: 1c27f92f471e5a758cd4e58e5ca4b3388f9e9763
-
Yedidya Feldblum authored
Summary: [Folly] Fix `folly/io/async/test/SSLContextTest.cpp` under gcc8 with `-Wshadow`. ``` folly/io/async/test/SSLContextTest.cpp: In member function 'virtual void folly::SSLContextTest_TestLoadCertificateChain_Test::TestBody()': folly/io/async/test/SSLContextTest.cpp:143:31: error: declaration of 'ctx' shadows a member of 'folly::SSLContextTest_TestLoadCertificateChain_Test' [-Werror=shadow] folly/io/async/test/SSLContextTest.cpp:29:14: note: shadowed declaration is here ``` Reviewed By: knekritz Differential Revision: D13610440 fbshipit-source-id: 3998a8a7434afdb27e9a89b3e85e87364cd2e72c
-
Yedidya Feldblum authored
Summary: [Folly] Fix `folly/gen/test/ParallelBenchmark.cpp` under gcc8 with `-Wshadow`. ``` In file included from folly/gen/test/Bench.h:19, from folly/gen/test/ParallelBenchmark.cpp:26: folly/Benchmark.h: In instantiation of 'typename std::enable_if<std::is_invocable<Lambda, unsigned int>::value>::type folly::addBenchmark(const char*, const char*, Lambda&&) [with Lambda = <lambda(unsigned int)>; typename std::enable_if<std::is_invocable<Lambda, unsigned int>::value>::type = void]': folly/gen/test/ParallelBenchmark.cpp:96:279: required from here folly/Benchmark.h:185:10: error: declaration of 'start' shadows a global declaration [-Werror=shadow] folly/gen/test/ParallelBenchmark.cpp:83:6: note: shadowed declaration is here ``` Reviewed By: Orvid Differential Revision: D13605092 fbshipit-source-id: ac791942edbfeda70809d4ab80d21bb3ff7dd8de
-
Yedidya Feldblum authored
Summary: [Folly] Fix `folly/test/stl_tests/StlVectorTest.cpp` under gcc8 with `-Wparentheses`. ``` folly/test/stl_tests/StlVectorTest.cpp: In function 'void test_copyConstruction(std::nullptr_t, Vector&, int)': folly/test/stl_tests/StlVectorTest.cpp:1780:11: error: unnecessary parentheses in declaration of 'ca2' [-Werror=parentheses] ``` Reviewed By: Gownta Differential Revision: D13604947 fbshipit-source-id: 36c0b596e07a19d4b282266574d1f4b837d5af4a
-
Yedidya Feldblum authored
Summary: [Folly] Fix `folly/test/small_vector_test.cpp` under gcc8 with `-Wshadow`. ``` folly/test/small_vector_test.cpp: In member function 'virtual void small_vector_NoCopyCtor_Test::TestBody()': folly/test/small_vector_test.cpp:898:10: error: declaration of 'struct small_vector_NoCopyCtor_Test::TestBody()::Test' shadows a previous local [-Werror=shadow] In file included from folly/portability/GTest.h:33, from folly/test/small_vector_test.cpp:33: third-party-buck/platform007/build/googletest/include/gtest/gtest.h:371:52: note: shadowed declaration is here ``` Reviewed By: Orvid Differential Revision: D13603337 fbshipit-source-id: 84747335787df4c9288d93f19bd0629c53a68e4d
-
Yedidya Feldblum authored
Summary: [Folly] Fix `FixedString` taking address of temporary array with latest versions of GCC. ``` In file included from folly/test/FixedStringTest.cpp:20: folly/FixedString.h: In instantiation of 'constexpr folly::BasicFixedString<Char, N>& folly::BasicFixedString<Char, N>::erase(std::size_t, std::size_t) [with Char = char; long unsigned int N = 26; std::size_t = long unsigned int]': folly/test/FixedStringTest.cpp:421:14: required from here folly/FixedString.h:1466:11: error: taking address of temporary array ``` Reviewed By: ericniebler Differential Revision: D13602969 fbshipit-source-id: fefa24eb00021b205498cbc7ebf7c43595d6aa8c
-
- 13 Jan, 2019 2 commits
-
-
Eric Niebler authored
Summary: The v1.0-beta branch of range-v3 has better compile times and improved conformance to the C++20 standard range interfaces. I will update this again when range-v3 v1.0 final is released, but at this point the benefits are great, and I am concerned about interface drift. Reviewed By: yfeldblum Differential Revision: D13647816 fbshipit-source-id: 340da2c177e1dc053facc84506a96e767e11f10d
-
Eric Niebler authored
Summary: All standard containers have an allocator_type typedef; so should sorted_vector_map and sorted_vector_set Reviewed By: yfeldblum Differential Revision: D13648217 fbshipit-source-id: ccf0b74af88f77b2b28620317cba8a868e9f9b0f
-
- 12 Jan, 2019 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Fix crash in `SingletonRelaxedCounter` when recreating threads. Reviewed By: andriigrynenko Differential Revision: D13645448 fbshipit-source-id: dea09925f1943ebf2141d69b791a9259524c19e1
-
- 11 Jan, 2019 6 commits
-
-
Stepan Palamarchuk authored
Summary: This adds a simple benchmark to measure the throughput of calling `Baton::timed_wait` with later fulfillment of Baton without hitting the timeout. This benchmark is useful to make sure that we don't regress when migrating to HHWheelTimer. It adds 3 case with 1, 5 and 10000 different timeout values used. Below are the results of running the benchmarks: ``` ============================================================================ folly/fibers/test/FibersBenchmark.cpp relative time/iter iters/s ============================================================================ FiberManagerCancelledTimeouts_Single_300 366.57ms 2.73 FiberManagerCancelledTimeouts_Five 365.44ms 2.74 FiberManagerCancelledTimeouts_TenThousand 693.06ms 1.44 ============================================================================ ``` Note, that the 10k case is slower because internally `TimeoutController` has `O(num_timeouts)` loop for looking up the correct queue. Reviewed By: jmswen Differential Revision: D13624361 fbshipit-source-id: 4c2324229f524b55d9cf2371ec2acca35db6f4ff
-
Stepan Palamarchuk authored
Summary: Currently we call `steady_clock::now` twice within just few instructions (one in `setScheduled` and one in `calcNextTick`) which adds unnecessary overhead. This diff makes us call it only once and use it for both computation of the deadline and tick number. This allows to achieve almost ~2x improvement in perf. Reviewed By: jmswen, vitaut Differential Revision: D13624360 fbshipit-source-id: 40bc3b3ad5123d22a5edcabd60d91c0f7efcbda7
-
Stepan Palamarchuk authored
Summary: This function is being overridden in only one class (with a duplicate) that is used in only a single test with no clear semantics of what is being tested (the only effect it has is that cascading logic will see 0, which can be achieved with a simple sleep). Removing this customization point allows us to avoid doing additional call to steady_clock::now per each timeout (stacked diff) and thus improving performance by ~2x (measured as part of Fibers benchmark after migrating FiberManager to use HHWheelTimer, also stacked). Reviewed By: jmswen Differential Revision: D13624362 fbshipit-source-id: ef3abd066d2a4f46b369f65d64dd58399ebf5e46
-
Kirk Shoop authored
Summary: deleting a stale benchmark report Reviewed By: yfeldblum Differential Revision: D13632256 fbshipit-source-id: b3ff7e109d51389179cd48c7260ab16cb9eb6e22
-
David Lively authored
Summary: `TimekeeperScheduledExecutor` adapts a (non-Scheduled) `Executor` to provide a `ScheduledExecutor` interface using a `Timekeeper`. Note this executor does not hold onto a pointer to the `Timekeeper`, but rather relies on the one returned by the `getTimekeeper` callback arg to `create` (default `folly::details::getTimekeeperSingleton`) when scheduling a task in the future, raising a `TimekeeperScheduledExecutorNoTimekeeper` exception if it returns null. Reviewed By: andriigrynenko Differential Revision: D13005248 fbshipit-source-id: fc075026f00de763cf5e67c0d7f5e657704e04a3
-
Joe Loser authored
Summary: - `std::random_shuffle` is deprecated in C++14 and removed in C++17. - While `Folly` only depends on C++14, it should not hinder users from building in C++17 mode. - To support users building with C++17 where `std::random_shuffle` is removed from the standard library, migrate the one call site to use `std::shuffle`. Pull Request resolved: https://github.com/facebook/folly/pull/993 Reviewed By: Orvid Differential Revision: D13620930 Pulled By: yfeldblum fbshipit-source-id: 630d1125155e022f4b3e804f92c02ec663a86c3b
-
- 10 Jan, 2019 2 commits
-
-
Chad Austin authored
Summary: Disallow initializing folly::Optional with nullptr as if it were folly::none. The previous behavior was a footgun when transitioning to C++17's std::optional. For example, given: ``` folly::Optional<bool> o1 = nullptr; std::optional<bool> o2 = nullptr; ``` o1 would be none, but o2 would have the value `{false}`. This diff makes the former illegal, preventing behavior changes when transitioning to std::optional. Reviewed By: yfeldblum Differential Revision: D12843022 fbshipit-source-id: 165d19a963672c04d9ec687cb687ca89f1837e21
-
Lewis Baker authored
Summary: The CoroTest.cpp file had some tests that were failing under Clang optimised builds due to a compiler bug. This rolls back those work arounds to re-expose the bug as a way of validating that the bug has been fixed. Reviewed By: tks2103 Differential Revision: D13383774 fbshipit-source-id: ac219c6ed0a0c8c3b8c3c06e3d01e5ed4ade81bc
-
- 09 Jan, 2019 1 commit
-
-
Orvid King authored
Reviewed By: yfeldblum Differential Revision: D13603396 fbshipit-source-id: 90d2ce9e4d3cfc681e27df84e8e989c7cee182cc
-