- 15 Jan, 2019 3 commits
-
-
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 2 commits
-
-
Orvid King authored
Reviewed By: yfeldblum Differential Revision: D13603396 fbshipit-source-id: 90d2ce9e4d3cfc681e27df84e8e989c7cee182cc
-
Tianjiao Yin authored
Summary: The code is not calling posix_spawn(...) correctly. Reviewed By: yfeldblum Differential Revision: D13596190 fbshipit-source-id: 266522ec2387b6e2294fc5899aa85afc19d8d919
-
- 08 Jan, 2019 5 commits
-
-
Victor Zverovich authored
Summary: Minor improvements to `Rcu.h`: * Spell out the first use of RCU for the sake of people who are not familiar with the abbreviation. * Correct the default template argument type in the comment: it's `RcuTag`, not `void`. * Don't expose `rcu_token` constructor to the users because it's only supposed to be obtained via `lock_shared`. * Make other single-argument constructors explicit to prevent undesirable conversions. * Parameterize `rcu_token` on the tag type to prevent cross-domain use. Reviewed By: yfeldblum Differential Revision: D13510133 fbshipit-source-id: d5d214cfa3b30d0857c14ac293da6e4310db1100
-
Victor Zverovich authored
Summary: Since we require C++14 in Folly and use `std::enable_if_t` in some places, there is no need for the `_t` workaround. Replace `_t<enable_if<...>>` with `enable_if_t<...>`. Reviewed By: yfeldblum Differential Revision: D13511564 fbshipit-source-id: 314b4a63281ce6b8275174ae89fab5fba1101bfb
-
Yedidya Feldblum authored
Summary: [Folly] `SingletonRelaxedCounter`, a singleton-per-tag relaxed counter. Differential Revision: D13149336 fbshipit-source-id: 7cf0144758e9595e188465137a336d712c5d9a76
-
Yedidya Feldblum authored
Summary: [Folly] Cut unused `hazptr` dep on `Singleton`. Reviewed By: magedm Differential Revision: D13586564 fbshipit-source-id: e0e87807f51f0d050e045961b5e40e600026f182
-
Yedidya Feldblum authored
Summary: [Folly] Alias `std::apply` for libc++ if c++17, and for msvc. Fixes #987. Reviewed By: gkmhub Differential Revision: D13562821 fbshipit-source-id: b1fef92eed24ce201e50dda72d1ee8b6db9ed6dd
-
- 07 Jan, 2019 4 commits
-
-
Tristan Rice authored
folly/synchronization/LifoSem: fixed race condition between tryRemoveNode and shutdown by checking the lock in shutdown (#989) Summary: Pull Request resolved: https://github.com/facebook/folly/pull/989 Original post: https://fb.workplace.com/groups/560979627394613/permalink/1370192126473355/ There was a bug where we weren't checking the isLocked bit when setting the isShutdown bit. Thus, tryRemoveNode would acquire the lock, shutdown would set the shutdown bit, and then tryRemoveNode would release the lock via a direct store which accidentally cleared the shutdown bit. The new code wait loops in shutdown until the lock is cleared. Reviewed By: yfeldblum, djwatson Differential Revision: D13586264 fbshipit-source-id: 52139df8d7880a60039b6dab810898e0546479dc
-
Victor Zverovich authored
Summary: Stumbled upon some unused includes. Remove them. Reviewed By: yfeldblum, stevegury Differential Revision: D13549301 fbshipit-source-id: 9e18e3764baff02d8a077a81124633ea21698dbb
-
Nikita Shirokov authored
Summary: in D13274704 default has been changed to OFF. fixing comment Reviewed By: yfeldblum Differential Revision: D13590584 fbshipit-source-id: af1bac2b866aa55f9645ce33da6e8850cd136d31
-
Doron Roberts-Kedes authored
Summary: Erase if and only if key k is equal to expected Reviewed By: magedm Differential Revision: D13542801 fbshipit-source-id: dd9e3b91a7e3104b18315043d5f81b6194a407eb
-