- 30 Apr, 2019 8 commits
-
-
Dan Melnic authored
Summary: [Folly] Enforce `SingletonThreadLocal` uniqueness also in the case where `FOLLY_TLS` is not defined. Since the uniqueness check should happen in all scenarios, just move it to a place which is not subject to conditional compilation. Reviewed By: yfeldblum Differential Revision: D15142661 fbshipit-source-id: 04dbc7bc775255a010f24c1496552cfc27970e1f
-
Lee Howes authored
Summary: Another overload that is not really necessary and adds complication. Removing to simplify. Reviewed By: yfeldblum Differential Revision: D15110009 fbshipit-source-id: a7a90799ff4d89d45ae82d2e755be5ee3799104c
-
Andrii Grynenko authored
Summary: This is mainly to workaround bugs triggered by LTO, when stack allocated variables in await_suspend end up on a coroutine frame. Reviewed By: lewissbaker Differential Revision: D15143193 fbshipit-source-id: 9553274e2d9c021902d9d19e7ecb2a91a86e787a
-
Chad Austin authored
Summary: Disabling the nullptr conversion to non-pointer folly::Optional<T> has baked long enough. Re-enabled it with the same behavior that std::optional has. Reviewed By: yfeldblum Differential Revision: D15057633 fbshipit-source-id: 6ba47a57a78ec4834ed4ecc8987a7c8870102ae4
-
Lee Howes authored
Summary: Another overload that is not really necessary and adds complication. Removing to simplify. Reviewed By: yfeldblum Differential Revision: D15109455 fbshipit-source-id: 4312aab817d9796358e0b659c50c6e8f9d9ccb4e
-
Kirk Shoop authored
Summary: after discussion with Lewis, change the contract for empty and error signals from the underlying executor in the strand implementation. error will forward the error to items in the queue and then reschedule for any remaining items done will forward the empty signal to items in the queue and then reschedule for any remaining items. These changes should prevent infinite scheduling loops and allow the underlying executor to push back against the items being submitted to the strand. Reviewed By: lewissbaker Differential Revision: D14955343 fbshipit-source-id: 926109594d7aed1766d868b705c84a6ed664e2f3
-
Lee Howes authored
Summary: Adds a SemiFuture variant of collectAny and forwards collectAny to it. This ensures that both options are available. Reviewed By: yfeldblum Differential Revision: D15111077 fbshipit-source-id: f4d6efc684ca632b71f7a8d2659ca4d968d15b6f
-
Andrii Grynenko authored
Summary: Make sure the future object doesn't get destroyed concurrently with the setCallback_ call. Reviewed By: yfeldblum Differential Revision: D15122238 fbshipit-source-id: c8de1cd158f317c3ed7591460ca2cccfa7633ae7
-
- 29 Apr, 2019 8 commits
-
-
Lewis Baker authored
Summary: Allow calling `baton.reset()` concurrently with `co_await`. Reviewed By: yfeldblum Differential Revision: D15058504 fbshipit-source-id: af7ff69ddc2c8a4663e0f7ef03121c01502a984d
-
Frieder Bluemle authored
Summary: Just a minor typo fix: `Github` -> `GitHub`. Pull Request resolved: https://github.com/facebook/folly/pull/1119 Differential Revision: D15120076 Pulled By: yfeldblum fbshipit-source-id: e0caccc022d0d740fd25ad1697b130fe7680f9a3
-
Brandon Schlinker authored
Summary: `WriteFlags::EOR` currently marks the end of a record (e.g., an HTTP response) and is used to request ACK timestamping. `WriteFlags::TIMESTAMP_TX` will be used to request timestamping when the entire write buffer has been transmitted by the NIC. If hardware timestamps are unavailable, then the timestamp will be taken when the the entire buffer has been handed to the NIC by the kernel. TX timestamps can be compared to send() timestamps to determine how long the write buffer was waiting in the kernel to be sent to the NIC. In the case of a large CWND + LOWAT, this could be a significant amount of time. In addition, TX timestamps help with throughput calculations as they enable the precise transmit time to be determined. We may want to rename `WriteFlags::EOR` or add a separate flag for ACK timestamping. For now, I've clarified the purpose of this field. Reviewed By: yfeldblum Differential Revision: D15081941 fbshipit-source-id: 239833cd5a0413e7468840960118a038ffdac068
-
Andrii Grynenko authored
Summary: It's unsafe to read Executor from Core, because it can be concurrently modified by a consumer thread. Reviewed By: yfeldblum Differential Revision: D15117907 fbshipit-source-id: 40caf4b2878609775c1c8476336349ddf3764d4d
-
Joe Loser authored
Summary: - `HasArgumentTypes` uses nested `boost::mpl::transform` calls to strip reference qualifiers from the function argument types and then another `mpl::transform` call to remove `const` qualifiers. - Replace the nested `mpl::transform` calls to just one call by using `folly::remove_cvref`. Pull Request resolved: https://github.com/facebook/folly/pull/1086 Reviewed By: Orvid Differential Revision: D14638843 Pulled By: yfeldblum fbshipit-source-id: 8c360e50ffaba0328aa8e4c86245ce25d45bc01b
-
Andrii Grynenko authored
Reviewed By: lewissbaker Differential Revision: D15114457 fbshipit-source-id: 0f49d631bd316fda828946971b607c94ee75250b
-
Joe Loser authored
Summary: - `fbstring_core` defines constants based on the host endianness. - This is purely duplicated as these constants live in `Portability.h`. As such, remove them from `fbstring_core` class. Pull Request resolved: https://github.com/facebook/folly/pull/1117 Reviewed By: Orvid Differential Revision: D15096910 Pulled By: yfeldblum fbshipit-source-id: ff4e828dfd1b19daeedf48bbf1719a3fd72c0843
-
Joe Loser authored
Summary: - Implement `erase` and `erase_if` for both `FBVector` and `small_vector`. - This matches the APIs as in the C++20 Library Fundamentals v2. Pull Request resolved: https://github.com/facebook/folly/pull/1089 Reviewed By: Orvid Differential Revision: D15112753 Pulled By: yfeldblum fbshipit-source-id: dc93c600fa8e7e8a7ed42d6a6e07439d4fa51204
-
- 28 Apr, 2019 1 commit
-
-
Meng Zhang authored
Summary: as title Differential Revision: D15115871 fbshipit-source-id: 16eff7f913bdd782192ffc0e06f03f1cf8f48393
-
- 27 Apr, 2019 9 commits
-
-
Matthieu Martin authored
Summary: This change has no effect for normal use of the semaphore. With try_acquire (previous change), we now allow the callers to pass their own baton. It's possible that the caller ends up not needing to use the `post`, and simply wants to signal the semaphore. It's basically useful in scenario where the caller wants to wait for the first of multiple events. Current code would deadlock in this scenario, this fixes it. Reviewed By: andriigrynenko Differential Revision: D15090395 fbshipit-source-id: 8e3d73705ef3559717b7335f6a9e9ea8bed1cb17
-
Matthieu Martin authored
Summary: This provides an interface for the Semaphore, which allow async waiting for more complex usage on fiber, without the future overhead. Reviewed By: andriigrynenko Differential Revision: D15082111 fbshipit-source-id: 76306525509f36867999db459ee0b7c42f416b6c
-
Nathan Bronson authored
Summary: This new test should have been inside the FOLLY_F14_VECTOR_INTRINSICS_AVAILABLE conditional compilation guard. Reviewed By: mengz0 Differential Revision: D15114483 fbshipit-source-id: 2931be7d4abf7a4a95827052905bd219c9beff13
-
Andrii Grynenko authored
Summary: It's unsafe to use Future after setCallback was called (its executor may be moved out), so we have to copy its executor before that. Reviewed By: yfeldblum Differential Revision: D15113490 fbshipit-source-id: 2fa9c323ddfe1919b84bbfe05b6c5643d0c65703
-
Yedidya Feldblum authored
Summary: [Folly] Let `RequestContext::setContext` and `RequestContextScopeGuard` members take `shared_ptr<RequestContex>` by reference. Saves a small amount on code size and runtime performance due to code size. Reviewed By: spalamarchuk Differential Revision: D15074704 fbshipit-source-id: 20f1149b8c56d6c4375d63fe21560bdda5e5ccae
-
Yedidya Feldblum authored
Summary: [Folly] Cut unused `FutureBase::setContext_` overload taking `shared_ptr<RequestContext>`. Reviewed By: mhorowitz Differential Revision: D15073509 fbshipit-source-id: a8a9d37e3420168e63692ba77063452849355361
-
Yedidya Feldblum authored
Summary: [Folly] Pass context by reference in the futures `Core`, saving on code size and a small on runtime performance due to code size. Reviewed By: Orvid Differential Revision: D15073282 fbshipit-source-id: 7c55b9f6a55ee7ec22fde6f3ab9da232a8ee006b
-
Yedidya Feldblum authored
Summary: [Folly] Move the context in futures `Core::doCallback` to shrink code size and to improve runtime performance (fewer branches, fewer atomic RMWs, smaller code size). Reviewed By: andriigrynenko Differential Revision: D15073122 fbshipit-source-id: f1b5cb01ea9ccaa69ac5b42b01a8ee5fa1badb8a
-
Yedidya Feldblum authored
Summary: [Folly] Cut explicit class template instantiations in futures. May save on code size when some of the given instantiations are not used, or when the given instantiations are used but when some of their members are not used. Reviewed By: LeeHowes Differential Revision: D15073879 fbshipit-source-id: c624d7ea1dad66f05a9958239a87737367450753
-
- 26 Apr, 2019 3 commits
-
-
Nathan Bronson authored
Summary: F14NodeMap and F14ValueMap copy construction could fail to copy the chunk overflow count in a rare case where there is a suffix of chunks that suffers an overflow, then all of the non-overflowed keys are removed, then the map is copied. In the copy the remaining overflowed key isn't find()able, but it is still present on the iteration sequence. This diff fixes the problem. Reviewed By: WillerZ, shixiao Differential Revision: D15105104 fbshipit-source-id: cff2073246bc301054996d4bb7e8baf9ee8c0021
-
Lee Howes authored
Summary: As part of simplifying and removing ambiguity in the interface this removes the form of then(KeepAlive, member-function-pointer). Removing this directly removes the need to make multiple overloads, and migrating to a cleaner then(KeepAlive,...) form will delegate this to the application of the nested continuation. Reviewed By: yfeldblum Differential Revision: D15059814 fbshipit-source-id: 8e4481cc471b4ed2dc578c52e26f2223c2468719
-
Andrii Vasylevskyi authored
Summary: Add getSecurityProtocol() to MockAsyncSocket Reviewed By: knekritz Differential Revision: D15099025 fbshipit-source-id: 98b1337a9016e75eff11f37899180d323b67247c
-
- 25 Apr, 2019 8 commits
-
-
Cen Zhao authored
Summary: zmq4.3 bring up 4 more handshake events, add proper handling in sock monitor Reviewed By: saifhhasan Differential Revision: D15058676 fbshipit-source-id: d2553c7e32471a2403857741cbb77a40e50d353e
-
Lewis Baker authored
Summary: Adds a utility that allows a coroutine to reschedule itself back onto its associated executor. This allows coroutines to cooperatively schedule themselves. It also allows a coroutine to force itself to be asynchronous by inserting a `co_await folly::coro::co_schedule;` as the first statement in the coroutine. Reviewed By: andriigrynenko Differential Revision: D15076362 fbshipit-source-id: 4a4a2978519e0709d28a3e1aa8745ee30ddc7751
-
Joe Loser authored
Summary: : - Replace a call site in `DynamicParser-inl.h` using `boost::is_member_pointer` with the standard library equivalent. Pull Request resolved: https://github.com/facebook/folly/pull/1085 Reviewed By: meyering Differential Revision: D14638847 Pulled By: yfeldblum fbshipit-source-id: 8eb95607dc7134b9bbc6974052094a92623fe776
-
Joe Loser authored
Summary: - Defining `FBSTRING_SANITIZE_ADDRESS` is more complicated than it needs to be and it is in fact not even needed now. - Remove separate `FBSTRING_SANITIZE_ADDRESS` symbol and use `FOLLY_SANITIZE_ADDRESS` in places which previously used `FBSTRING_SANITIZE_ADDRESS`. Pull Request resolved: https://github.com/facebook/folly/pull/1094 Reviewed By: Orvid Differential Revision: D14969931 Pulled By: yfeldblum fbshipit-source-id: 7c1a585180ca99d1e2f616765aa77f45c4426fb8
-
Victor Zverovich authored
Summary: Migrate from Folly Format to fmt which provides smaller compile times and per-call binary code size. Reviewed By: alandau Differential Revision: D14954926 fbshipit-source-id: 9d2c39e74a5d11e0f90c8ad0d71b79424c56747f
-
Nick Terrell authored
Summary: Remove manual include overrides Reviewed By: k21 Differential Revision: D15085229 fbshipit-source-id: fbd3c66184a696131c61605eeb0bba119e59af9e
-
Amir Livneh authored
Reviewed By: JunqiWang Differential Revision: D15073399 fbshipit-source-id: 909fccfaa39da8f718b1195fa09ed2628f073c51
-
Lee Howes authored
Remove deprecation from then that simply forwards to thenTry. Deprecation was inconsistent with defer. Summary: Future::then that forwards directly to thenTry is to be left for compatibility with Future::defer and to keep naming simple. This removes the confusing deprecation warning. Reviewed By: yfeldblum Differential Revision: D15057215 fbshipit-source-id: 84103e47c958f1db602804f625591ba899e98b23
-
- 24 Apr, 2019 3 commits
-
-
Lee Howes authored
Summary: Functions were deprecated and =deleted to communicate their removal with a clear error rather than having the functions simply disappear. They have been in this state for long enough to cleanly remove them. Reviewed By: yfeldblum Differential Revision: D15057175 fbshipit-source-id: fc9bb193e3cc9157ef6b898f0e4b7717581c1cdd
-
Jacob Lacouture authored
Summary: AFAIK, thenValue should effectively NOP if the future has an exception. Instead, it throws. C++ throw is expensive, as the stack_unwind process acquires a futex. If the service is seeing lots of exceptions (for example if it's overloaded and trying to shed load) throwing results in high lock contention. Reviewed By: yfeldblum Differential Revision: D13088019 fbshipit-source-id: a4bd39d8196d8691ca3a2c21a4860024b366fdac
-
Chad Austin authored
Summary: Fix unused-argument warnings. Reviewed By: yfeldblum Differential Revision: D15068741 fbshipit-source-id: 486451bd9bd8575bed8a647f4531783c82c079b5
-