Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #1

Merged
merged 1,043 commits into from
Mar 4, 2019
Merged

update #1

merged 1,043 commits into from
Mar 4, 2019
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Dec 28, 2018

  1. extend FOLLY_F14_PERTURB_INSERTION_ORDER to all F14FastMap/Set

    Summary:
    Previously the debug-build randomization of F14 iteration order
    was applied only to F14ValueMap/Set, F14NodeMap/Set, and F14FastMap/Set
    that uses the value storage strategy.  This extends the behavior to
    F14FastMap/Set that use the vector storage strategy, which are those
    instances where sizeof(value_type) >= 24.
    
    F14FastMap/Set using the vector storage strategy must move items
    to randomize, so this reordering will also expose cases that assume
    reference or iterator stability across multiple inserts without a call
    to .reserve().
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13305818
    
    fbshipit-source-id: 178a1f7b707998728a0451af34269e735bf063f3
    Nathan Bronson authored and facebook-github-bot committed Dec 28, 2018
    Configuration menu
    Copy the full SHA
    0c66e13 View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2018

  1. test_once

    Summary:
    [Folly] `test_once`, a way to check whether any call to `call_once` with a given `once_flag` has succeeded.
    
    One example of use might be for exception-safety guarding object destruction when object construction is guarded by the `once_flag`, and when the user is interested in conserving per-object memory and wishes to avoid the extra 8-byte overhead of `std::optional`.
    
    ```lang=c++
    template <typename T>
    struct Lazy {
      folly::aligned_storage_for_t<T> storage;
      folly::once_flag once;
    
      ~Lazy() {
        if (folly::test_once(once)) {
          reinterpret_cast<T&>(storage).~T();
        }
      }
    
      template <typename... A>
      T& construct_or_fetch(A&&... a) {
        folly::call_once(once, [&] { new (&storage) T(std::forward<A>(a)...); });
        return reinterpret_cast<T&>(storage);
      }
    };
    ```
    
    Reviewed By: ovoietsa
    
    Differential Revision: D13561365
    
    fbshipit-source-id: 8376c154002f1546f099903c4dc6be94dd2def8e
    yfeldblum authored and facebook-github-bot committed Dec 30, 2018
    Configuration menu
    Copy the full SHA
    d7d5fe1 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2019

  1. hazptr: Avoid deadlock on tagged list

    Summary:
    Prevent deadlock on tagged retired lists within calls to `do_reclamation()` that call `cleanup_batch_tag()`.
    
    Changes:
    - Make locking the tagged list reentrant.
    - Eliminate sharding of tagged lists to prevent deadlock between concurrent calls to `do_reclamation()` on different shards that call `cleanup_batch_tag` on the other shard.
    - Expose the list of unprotected objects being reclaimed in `do_reclamation()` of the tagged list so that calls to `cleanup_batch_tag()` don't miss objects with a matching tag.
    - Refactor of commonalities between calls to `retire()` in `hazptr_obj_base` and `hazptr_obj_base_linked` into `hazptr_obj::push_obj()`.
    - Fixed release of tagged list lock to use CAS in a loop instead of store, since concurrent lock-free pushes are possible.
    
    Reviewed By: davidtgoldblatt
    
    Differential Revision: D13439983
    
    fbshipit-source-id: 5cea585c577a64ea8b43a1827522335a18b9a933
    magedm authored and facebook-github-bot committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    b693ea2 View commit details
    Browse the repository at this point in the history
  2. ConcurrentHashMap: Enable destruction order guarantee

    Summary: Enable destruction order guarantee, i.e., destructors for all key and value instances will complete before the completion of the destructor of the associated ConcurrentHashMap instance.
    
    Reviewed By: davidtgoldblatt
    
    Differential Revision: D13440153
    
    fbshipit-source-id: 21dce09fa5ece00eaa9caf7a37b5a64be3319d5e
    magedm authored and facebook-github-bot committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    9e65297 View commit details
    Browse the repository at this point in the history
  3. hazptr: Add test for recursive destruction

    Summary: Add test for recursive destruction.
    
    Reviewed By: djwatson
    
    Differential Revision: D13476864
    
    fbshipit-source-id: 513f39f44ad2f0d338d10066b2e337902db32e00
    magedm authored and facebook-github-bot committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    175e5c9 View commit details
    Browse the repository at this point in the history
  4. memory savings for F14 tables with explicit reserve()

    Summary:
    In the case when an explicit capacity is specified (via reserve()
    or an initial capacity) we can save memory by using a bucket_count()
    off of the normal geometric sequence.  This is beneficial for sizes
    <= Chunk::kCapacity for all policies, and for F14Vector tables with
    any size.  In the multi-chunk F14Vector case this will save about
    40%*size()*sizeof(value_type) when reserve() is used (such as during
    Thrift deserialization).  The single-chunk savings are potentially larger.
    The changes do not affect the lookup path and should be a tiny perf win in
    the non-growing insert case.  Exact sizing is only attempted on reserve()
    or rehash() when the requested capacity is >= 9/8 or <= 7/8 of the current
    bucket_count(), so it won't trigger O(n^2) behavior even if misused.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D12848355
    
    fbshipit-source-id: 4f70b4dabf626142cfe370e5b1db581af1a1103f
    Nathan Bronson authored and facebook-github-bot committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    3d169f4 View commit details
    Browse the repository at this point in the history
  5. Remove the fd overload of AsyncSocket::OptionKey::apply

    Summary: Everything has been migrated over to the NetworkSocket overload.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13566609
    
    fbshipit-source-id: 920505a9e91f1acc5810949049880ed07294621b
    Orvid authored and facebook-github-bot committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    1d5519d View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2019

  1. Make co_current_executor look like nullptr, std::nullopt, std::in_place

    Summary:
    [Folly] Make `co_current_executor` look like `nullptr`, `std::nullopt`, `std::in_place`.
    
    * Use a `co_` prefix to indicate that it is offers a useful result when awaited.
    * Offer a well-named value with a well-named type or type alias.
      * There is the `nullptr` value and `std::nullptr_t` type or type alias.
      * There is the `std::nullopt` value and the `std::nullopt_t` type or type alias.
      * There is the `std::in_place` value and the `std::in_place_t` type or type alias.
    
    Reviewed By: andriigrynenko, lewissbaker
    
    Differential Revision: D13561713
    
    fbshipit-source-id: 835da086e7165d37a952a1f169318cb566401d12
    yfeldblum authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    8cf16b1 View commit details
    Browse the repository at this point in the history
  2. Generic detection of empty-callable in Function ctor

    Summary:
    [Folly] Generic detection of empty-callable in `Function` ctor.
    
    Constructing a `folly::Function` from an empty `std::function` should result in an empty object. However, it results in a full object which, when invoked, throws `std::bad_function_call`. This may be a problem in some cases which need to use the emptiness/fullness property to tell whether `std::bad_function_call` would be thrown if the object were to be invoked.
    
    This solution proposes a new protocol: to check arguments of all types, not just pointers, for constructibility-from and equality-comparability-with `nullptr`, and then if those two checks pass, to check equality-comparison-with `nullptr`. If the argument type is is constructible from `nullptr` and is equality-comparable with `nullptr` and compares equal to `nullptr, then treat the argument as empty, i.e., as if it were `nullptr`. This way, an empty `std::function` gets treated as if it were `nullptr` - as well as any other custom function object type out there - without having to enumerate every one of them.
    
    The new protocol is somewhat strict. An alternative to the new protocol is to check if the object is castable to `bool` and, if it is, cast to `bool`, but such a protocol is broader than the one proposed in this diff.
    
    Fixes #886.
    
    Reviewed By: nbronson
    
    Differential Revision: D9287898
    
    fbshipit-source-id: bcb574387122aac92d154e81732e82ddbcdd4915
    yfeldblum authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    18cfe81 View commit details
    Browse the repository at this point in the history
  3. Fix misfiring unused-local-typedef under clang

    Summary:
    [Folly] Fix misfiring `unused-local-typedef` under clang.
    
    The problem is fixed in most recent versions of clang, but appears with some previous versions.
    
    ```
    folly/experimental/coro/Task.h:318:11: error: unused type alias 'handle_t' [-Werror,-Wunused-local-typedef]
        using handle_t =
              ^
    ```
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D13569416
    
    fbshipit-source-id: 94ae07455c2d08a1516c10baf1e3a16f2a29225f
    yfeldblum authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    94af642 View commit details
    Browse the repository at this point in the history
  4. Support -fno-exceptions in folly/small_vector.h

    Summary: [Folly] Support `-fno-exceptions` in `folly/small_vector.h`.
    
    Reviewed By: ot
    
    Differential Revision: D13499417
    
    fbshipit-source-id: d1b50ff7f028203849888f42a44c9370986a7ac1
    yfeldblum authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    948bc7b View commit details
    Browse the repository at this point in the history
  5. Cancel timeouts about to run in the cancelAll

    Summary:
    Currently if `cancelAll` is called from inside the `timeoutExpired` of one of the callbacks, it will not cancel timeouts that we're about to run (they were extracted from the buckets already).
    
    This diff fixes that behavior by also canceling timeouts in `timeoutsToRunNow_` list (note, we were already doing that in the destructor).
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13531908
    
    fbshipit-source-id: f05ba31f2ac845851c1560d2ebdf41aa995b2deb
    spalamarchuk authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    3a06d04 View commit details
    Browse the repository at this point in the history
  6. Pass the nextTick into scheduleTimeoutImpl instead of recomputing it

    Summary:
    Currently, every timeout scheduling will compute the next tick twice:
    * when deciding which bucket to use
    * when actually scheduling next timeout in `scheduleNextTimeout`
    
    This means that we may end up using a bigger nextTick in `scheduleNextTimeout` (if we were at a boundary of a tick and/or if there was a context switch). This means that if the timeout value is low and we will put it for `nextTick`, then it will end up waiting 2.5s (while we make one round over all slots).
    
    With this change we make sure that the same tick is used.
    
    I could consistently reproduce an issue by running 256 threads that just schedule immediate timeouts all the time.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13531907
    
    fbshipit-source-id: a152cbed7b89e8426b2c52281b5b6e171e4520ea
    spalamarchuk authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    ae82765 View commit details
    Browse the repository at this point in the history
  7. Prevent premature timeouts

    Summary:
    The current implementation may fire timeouts prematurely due to them being put in a bucket that we're about to run. In particular, timeouts that span `WHEEL_SIZE-1` (2.55-2.56s with default interval of 10ms) have very high likelihood of being fired immediately if we have another callback already scheduled.
    
    The issue is that we may use a bucket for the next epoch of wheel before the previous epoch drained it. This diff fixes it by using next unprocessed bucket as a base.
    
    Reviewed By: yfeldblum, djwatson
    
    Differential Revision: D13541502
    
    fbshipit-source-id: 963139e77615750820a63274a1e21929e11184f1
    spalamarchuk authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    c53bda7 View commit details
    Browse the repository at this point in the history
  8. Allow cascading into the current tick

    Summary:
    Currently, when cascading, we are unable to use bucket 0. This means that timeouts that are already expired would need to wait another tick before being fired.
    
    A simple example is when we're at tick 0 and scheduling for tick 256, such timeout would go into cascading logic and should fall into bucket 0 of next wheel epoch. However, the existing logic would cascade it to bucket 1.
    
    This diff fixes that, by reordering draining of current bucket and cascading timeouts.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13541506
    
    fbshipit-source-id: 1284fca18612ae91f96538192bfad75e27cd816c
    spalamarchuk authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    67cb8ee View commit details
    Browse the repository at this point in the history
  9. Always use real next tick when computing deadline

    Summary:
    Current logic will use last processed tick as next tick if we are inside of timeout handling.
    
    However, this is wrong in two ways:
    * cascading logic would compute number of ticks until expiration from real current time, however it will use `lastTick_` as base and thus may lead to premature timeout.
    * if we spent non-trivial amount of time invoking callbacks, we may use stale tick number as base of some timeout.
    
    Reviewed By: djwatson
    
    Differential Revision: D13541504
    
    fbshipit-source-id: b7e675bb5a707161f5c7f636d4c2a374a118da83
    spalamarchuk authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    6ea3ec0 View commit details
    Browse the repository at this point in the history
  10. Fold lastTick_ into expireTick_

    Summary: There's no need to distinguish between them (it only adds complexity by having two modes: schedules vs running).
    
    Reviewed By: djwatson
    
    Differential Revision: D13541505
    
    fbshipit-source-id: 7cb2c3fb9ba4e3b191adee37ad1d28f471378f85
    spalamarchuk authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    65ad7e9 View commit details
    Browse the repository at this point in the history
  11. Avoid repeated calls to std::chrono::steady_clock::now in cascading l…

    …ogic
    
    Summary: There's no need to extensively call into steady_clock, because the time is unlikely to change. And if it does change, then it means that we'd do incorrect math (like firing timeout 10ms earlier).
    
    Reviewed By: djwatson, stevegury
    
    Differential Revision: D13541503
    
    fbshipit-source-id: cc46c8a6bd6a72544803a22d16235be54fa94cc4
    spalamarchuk authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    be55c93 View commit details
    Browse the repository at this point in the history
  12. Add a missing blank line (style nit)

    Summary: [Folly] Add a missing blank line (style nit).
    
    Reviewed By: lewissbaker
    
    Differential Revision: D13571222
    
    fbshipit-source-id: 1dd23f4fc895e5698f94be6b2cbf90a9f30aae41
    yfeldblum authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    0c1847c View commit details
    Browse the repository at this point in the history
  13. Add AsyncUDPSocket support for sendmmsg

    Summary: Add AsyncUDPSocket support for sendmmsg
    
    Reviewed By: djwatson
    
    Differential Revision: D13521601
    
    fbshipit-source-id: 89382e18943e01012ff1e56a40f655d634a6e146
    dmm-fb authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    c533bbd View commit details
    Browse the repository at this point in the history
  14. Added a precision example (#988)

    Summary:
    Because it wasn't clear for non-python developers. And this document is referenced in Spark AR documentation.
    Pull Request resolved: #988
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13570180
    
    Pulled By: Orvid
    
    fbshipit-source-id: 2e1f787c5e1bb50a90c85a12e6801a79a3b46999
    tomasdev authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    8b1bbbf View commit details
    Browse the repository at this point in the history
  15. Add support for zstd-1.3.8

    Summary:
    Adds support for zstd-1.3.8 so OSS builds work.
    We can support zstd < 1.3.8 for some time with this small compatibility layer.
    I plan on always supporting at minimum the latest 2 zstd versions.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13569550
    
    fbshipit-source-id: 67d53c9ad0051a889b810c9ad46a2f349122cf7e
    terrelln authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    ad036b6 View commit details
    Browse the repository at this point in the history
  16. import farmhash

    Summary:
    This diff imports farmhash.h and farmhash.cc from
    https://github.com/google/farmhash and updates the public_tld license
    file accordingly. Build integration and namespace changes will occur in
    later diffs.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13436553
    
    fbshipit-source-id: 7a081032cb35a1a3e1cd14e2edf2685906956396
    Nathan Bronson authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    e84801b View commit details
    Browse the repository at this point in the history
  17. fix F14MapTest on android

    Summary:
    Skip F14Map.continuousCapacity* tests if intrinsics are not
    available, and don't use c++17 API in the test.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13575479
    
    fbshipit-source-id: 1cbbd10990ba5f0cc64ad1b29d4701b700dd16be
    Nathan Bronson authored and facebook-github-bot committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    f7f0026 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2019

  1. Add functions to get the NetworkSockets out of various types of sockets

    Summary: As interim steps to codemod to.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13568657
    
    fbshipit-source-id: b143b5bab0a64c196892358a30fce17037b19b21
    Orvid authored and facebook-github-bot committed Jan 4, 2019
    Configuration menu
    Copy the full SHA
    61a8ac3 View commit details
    Browse the repository at this point in the history
  2. Add simple SharedMutex to folly::coro

    Summary:
    Adds a simple SharedMutex type to the folly::coro namespace.
    
    The `co_[scoped_]lock[_shared]()` methods return semi-awaitables that require the caller to provide an executor to resume on in the case that the lock could not be acquired synchronously. This avoids some potential issues that could occur if the `.unlock()` operation were to resume awaiting coroutines inline.
    
    If you are awaiting within a `folly::coro::Task` then the current executor is implicitly provided. Otherwise, the caller can explicitly provide an executor by calling `.viaIfAsync()`.
    
    The implementation has not been optimised and currently just relies on a `SpinLock` to synchronise access to internal state.
    
    The main aim for this change is to make available a SharedMutex abstraction with the desired API that applications can start writing against which we can later optimise as required.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D9995286
    
    fbshipit-source-id: aa141ad241d29daff2df5f7296161517c99ab8ef
    Lewis Baker authored and facebook-github-bot committed Jan 4, 2019
    Configuration menu
    Copy the full SHA
    fbe60fe View commit details
    Browse the repository at this point in the history
  3. Make sure SemiFuture can't be used as a inline task

    Summary:
    Before this change one could write:
      SemiFuture<void> f() {
        co_await f1();
        co_await f2();
      }
    where SemiFuture coroutine would have semantics of an InlineTask (f1 called inline, f2 would be called on the executor which completes f1). This doesn't match the semantics of SemiFuture with deferred work (both f1() and f2() called on the executor that was passed to SemiFuture's via).
    
    Drop support for SemiFuture coroutines, because that isn't used anywhere except for toSemiFuture function.
    
    Reviewed By: lewissbaker
    
    Differential Revision: D13501140
    
    fbshipit-source-id: d77f491821e6a77cef0c92d83839bff538552b32
    andriigrynenko authored and facebook-github-bot committed Jan 4, 2019
    Configuration menu
    Copy the full SHA
    19febc9 View commit details
    Browse the repository at this point in the history
  4. use conditional compilation rather than skip for unsupported tests

    Reviewed By: mengz0
    
    Differential Revision: D13580163
    
    fbshipit-source-id: 195e3007c6cbf4bf7281435c48a9b6f6c6eada5b
    Nathan Bronson authored and facebook-github-bot committed Jan 4, 2019
    Configuration menu
    Copy the full SHA
    73044d8 View commit details
    Browse the repository at this point in the history
  5. folly::coro::Task now preserves RequestContext across suspend/resume …

    …points
    
    Summary:
    The folly::coro::Task coroutine type now captures the current RequestContext when the coroutine suspends and restores it when it later resumes.
    
    This means that folly::coro::Task can now be used safely with RequestContext and RequestContextScopeGuard.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D9973428
    
    fbshipit-source-id: 41ea54baf334f0af3dd46ceb32465580f06fb37e
    Lewis Baker authored and facebook-github-bot committed Jan 4, 2019
    Configuration menu
    Copy the full SHA
    d5f9c13 View commit details
    Browse the repository at this point in the history
  6. Expose the IOBuf SharedInfo::userData

    Summary:
    Expose the IOBuf SharedInfo::userData
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13577451
    
    fbshipit-source-id: b52ebbf77d00594a04c26e629d5c208e92801d93
    dmm-fb authored and facebook-github-bot committed Jan 4, 2019
    Configuration menu
    Copy the full SHA
    ec0bb77 View commit details
    Browse the repository at this point in the history
  7. Add takeOwnershipBenchmark IOBuf benchmark

    Summary: Add takeOwnershipBenchmark IOBuf benchmark
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13580855
    
    fbshipit-source-id: 6c8e81e580daf8e097be03235f3720e79eadc21f
    dmm-fb authored and facebook-github-bot committed Jan 4, 2019
    Configuration menu
    Copy the full SHA
    44f373b View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2019

  1. folly ConcurrentHashMap: add erase_if_equal function

    Summary: Erase if and only if key k is equal to expected
    
    Reviewed By: magedm
    
    Differential Revision: D13542801
    
    fbshipit-source-id: dd9e3b91a7e3104b18315043d5f81b6194a407eb
    Doron Roberts-Kedes authored and facebook-github-bot committed Jan 7, 2019
    Configuration menu
    Copy the full SHA
    b555e4c View commit details
    Browse the repository at this point in the history
  2. AsyncUDPSocket: fixing documentation

    Summary: in D13274704 default has been changed to OFF. fixing comment
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13590584
    
    fbshipit-source-id: af1bac2b866aa55f9645ce33da6e8850cd136d31
    Nikita Shirokov authored and facebook-github-bot committed Jan 7, 2019
    Configuration menu
    Copy the full SHA
    f60210a View commit details
    Browse the repository at this point in the history
  3. Remove unnecessary includes and dependencies

    Summary: Stumbled upon some unused includes. Remove them.
    
    Reviewed By: yfeldblum, stevegury
    
    Differential Revision: D13549301
    
    fbshipit-source-id: 9e18e3764baff02d8a077a81124633ea21698dbb
    vitaut authored and facebook-github-bot committed Jan 7, 2019
    Configuration menu
    Copy the full SHA
    7815aad View commit details
    Browse the repository at this point in the history
  4. folly/synchronization/LifoSem: fixed race condition between tryRemove…

    …Node and shutdown by checking the lock in shutdown (#989)
    
    Summary:
    Pull Request resolved: #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
    d4l3k authored and facebook-github-bot committed Jan 7, 2019
    Configuration menu
    Copy the full SHA
    7050206 View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2019

  1. Alias std::apply for libc++ if c++17

    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
    yfeldblum authored and facebook-github-bot committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    cf24695 View commit details
    Browse the repository at this point in the history
  2. Cut unused hazptr dep on Singleton

    Summary: [Folly] Cut unused `hazptr` dep on `Singleton`.
    
    Reviewed By: magedm
    
    Differential Revision: D13586564
    
    fbshipit-source-id: e0e87807f51f0d050e045961b5e40e600026f182
    yfeldblum authored and facebook-github-bot committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    8036897 View commit details
    Browse the repository at this point in the history
  3. SingletonRelaxedCounter

    Summary: [Folly] `SingletonRelaxedCounter`, a singleton-per-tag relaxed counter.
    
    Differential Revision: D13149336
    
    fbshipit-source-id: 7cf0144758e9595e188465137a336d712c5d9a76
    yfeldblum authored and facebook-github-bot committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    f2074bf View commit details
    Browse the repository at this point in the history
  4. Replace _t<enable_if<...>> with enable_if_t<...>

    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
    vitaut authored and facebook-github-bot committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    c3dd651 View commit details
    Browse the repository at this point in the history
  5. Minor improvements to Rcu.h

    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
    vitaut authored and facebook-github-bot committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    fdac3c4 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2019

  1. fix ASAN crash in unit-test failure

    Summary: The code is not calling posix_spawn(...) correctly.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13596190
    
    fbshipit-source-id: 266522ec2387b6e2294fc5899aa85afc19d8d919
    Mizuchi authored and facebook-github-bot committed Jan 9, 2019
    Configuration menu
    Copy the full SHA
    ef56dd7 View commit details
    Browse the repository at this point in the history
  2. AsyncSocket.getFd to AsyncSocket.getNetworkSocket

    Reviewed By: yfeldblum
    
    Differential Revision: D13603396
    
    fbshipit-source-id: 90d2ce9e4d3cfc681e27df84e8e989c7cee182cc
    Orvid authored and facebook-github-bot committed Jan 9, 2019
    Configuration menu
    Copy the full SHA
    efe97b1 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2019

  1. Revert workarounds for Clang coroutines bugs in tests

    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
    Lewis Baker authored and facebook-github-bot committed Jan 10, 2019
    Configuration menu
    Copy the full SHA
    c339c77 View commit details
    Browse the repository at this point in the history
  2. Disallow constructing folly::Optional with nullptr

    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
    chadaustin authored and facebook-github-bot committed Jan 10, 2019
    Configuration menu
    Copy the full SHA
    b996730 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2019

  1. Replace std::random_shuffle with std::shuffle (#993)

    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: #993
    
    Reviewed By: Orvid
    
    Differential Revision: D13620930
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: 630d1125155e022f4b3e804f92c02ec663a86c3b
    JoeLoser authored and facebook-github-bot committed Jan 11, 2019
    Configuration menu
    Copy the full SHA
    dc13d4a View commit details
    Browse the repository at this point in the history
  2. introduce TimekeeperScheduledExecutor (adaptor)

    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
    David Lively authored and facebook-github-bot committed Jan 11, 2019
    Configuration menu
    Copy the full SHA
    6bef3cc View commit details
    Browse the repository at this point in the history
  3. remove stale benchmark report

    Summary: deleting a stale benchmark report
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13632256
    
    fbshipit-source-id: b3ff7e109d51389179cd48c7260ab16cb9eb6e22
    Kirk Shoop authored and facebook-github-bot committed Jan 11, 2019
    Configuration menu
    Copy the full SHA
    136b653 View commit details
    Browse the repository at this point in the history
  4. Remove HHWheelTimer::Callback::getCurTime and its overrides

    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
    spalamarchuk authored and facebook-github-bot committed Jan 11, 2019
    Configuration menu
    Copy the full SHA
    32236ec View commit details
    Browse the repository at this point in the history
  5. Avoid duplicate call to steady_clock::now

    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
    spalamarchuk authored and facebook-github-bot committed Jan 11, 2019
    Configuration menu
    Copy the full SHA
    24e1994 View commit details
    Browse the repository at this point in the history
  6. Add benchmark for througput of timed_wait with cancelation

    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
    spalamarchuk authored and facebook-github-bot committed Jan 11, 2019
    Configuration menu
    Copy the full SHA
    700f192 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2019

  1. Fix crash in SingletonRelaxedCounter

    Summary: [Folly] Fix crash in `SingletonRelaxedCounter` when recreating threads.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D13645448
    
    fbshipit-source-id: dea09925f1943ebf2141d69b791a9259524c19e1
    yfeldblum authored and facebook-github-bot committed Jan 12, 2019
    Configuration menu
    Copy the full SHA
    0244777 View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2019

  1. Add allocator_type typedefs to the folly sorted vector types

    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
    Eric Niebler authored and facebook-github-bot committed Jan 13, 2019
    Configuration menu
    Copy the full SHA
    9a9d6ef View commit details
    Browse the repository at this point in the history
  2. Update range-v3 to v1.0-beta from upstream.

    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 and facebook-github-bot committed Jan 13, 2019
    Configuration menu
    Copy the full SHA
    67f61a8 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2019

  1. Fix FixedString taking address of temporary array

    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
    yfeldblum authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    811057f View commit details
    Browse the repository at this point in the history
  2. Fix folly/test/small_vector_test.cpp under gcc8 with -Wshadow

    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
    yfeldblum authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    a278269 View commit details
    Browse the repository at this point in the history
  3. Fix folly/test/stl_tests/StlVectorTest.cpp under gcc8 with -Wparentheses

    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
    yfeldblum authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    bb1efad View commit details
    Browse the repository at this point in the history
  4. Fix folly/gen/test/ParallelBenchmark.cpp under gcc8 with -Wshadow

    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
    yfeldblum authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    e2d788f View commit details
    Browse the repository at this point in the history
  5. Fix folly/io/async/test/SSLContextTest.cpp under gcc8 with -Wshadow

    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
    yfeldblum authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    b0c8ad2 View commit details
    Browse the repository at this point in the history
  6. Fix folly/fibers/test/FibersTest.cpp under gcc8 with -Wshadow

    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
    yfeldblum authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    9c96e07 View commit details
    Browse the repository at this point in the history
  7. Fix folly/experimental/pushmi under gcc8 with -Wmissing-braces

    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
    yfeldblum authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    4a8a8fc View commit details
    Browse the repository at this point in the history
  8. Fix use-before-deduction in folly/experimental/pushmi/

    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
    yfeldblum authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    9e17ee2 View commit details
    Browse the repository at this point in the history
  9. Fix folly/experimental/pushmi/ under gcc8 with -Wshadow

    Summary: [Folly] Fix `folly/experimental/pushmi/` under gcc8 with `-Wshadow`.
    
    Reviewed By: ericniebler
    
    Differential Revision: D13648409
    
    fbshipit-source-id: 2d46c3a5fa3587e954cb842c2207dceb01958008
    yfeldblum authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    5d53b33 View commit details
    Browse the repository at this point in the history
  10. Fix folly/Poly-inl.h under gcc8 with -Wplacement-new

    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
    yfeldblum authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    ed83e5f View commit details
    Browse the repository at this point in the history
  11. Cut unused sender_requires_from

    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
    yfeldblum authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    01f7795 View commit details
    Browse the repository at this point in the history
  12. packaging for farmhash

    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
    Nathan Bronson authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    6b34b1b View commit details
    Browse the repository at this point in the history
  13. Added comparison with tolerance for doubles.

    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
    tau0 authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    5163504 View commit details
    Browse the repository at this point in the history
  14. Add folly::CancellationToken

    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
    Lewis Baker authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    25374a6 View commit details
    Browse the repository at this point in the history
  15. Use Executor::KeepAlive in coro::Task

    Reviewed By: lewissbaker
    
    Differential Revision: D13657174
    
    fbshipit-source-id: afdda6abf02cb9e10b8696e1d81e9c2881521788
    andriigrynenko authored and facebook-github-bot committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    7c6897a View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2019

  1. Exclude folly/external/ from clang-format

    Summary: [Folly] Exclude `folly/external/` from `clang-format`.
    
    Reviewed By: igorsugak
    
    Differential Revision: D13666741
    
    fbshipit-source-id: cdf95ea85f7f21ca580888aa44983b1fb405fc09
    yfeldblum authored and facebook-github-bot committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    5c8439f View commit details
    Browse the repository at this point in the history
  2. Use dummy KeepAlive for nested Tasks

    Reviewed By: lewissbaker
    
    Differential Revision: D13658986
    
    fbshipit-source-id: af03f4e2edea93371fc37773f2fea152f7c589f8
    andriigrynenko authored and facebook-github-bot committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    c01f0af View commit details
    Browse the repository at this point in the history
  3. improve optionals and futures.

    Summary:
    Add and assign to options bindings.
    Add a isReady to future bindings
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13667465
    
    fbshipit-source-id: 8522ef59d7d262cc13dc9f9940c37b7a0b65870c
    fried authored and facebook-github-bot committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    6890c57 View commit details
    Browse the repository at this point in the history
  4. Implement inverted layout in EliasFanoCoding

    Summary: In some cases we want to prefetch the upper bits first.
    
    Reviewed By: philippv, luciang
    
    Differential Revision: D13663518
    
    fbshipit-source-id: c69fe4740fb96f3e9d448410cdf9c4a6edbb6c30
    ot authored and facebook-github-bot committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    01ed0e7 View commit details
    Browse the repository at this point in the history
  5. Add free function accessor

    Summary: Adds an accessor for the free function.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13648280
    
    fbshipit-source-id: ca92054b88b27569d6afec2ed4d1bd68351857cc
    Andrew Hall authored and facebook-github-bot committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    cef3dec View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2019

  1. AtomicReadMostlyMainPtr: add a DCHECK.

    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
    davidtgoldblatt authored and facebook-github-bot committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    349b232 View commit details
    Browse the repository at this point in the history
  2. Use _t variants of type traits (#994)

    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: #994
    
    Reviewed By: vitaut
    
    Differential Revision: D13634598
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: 09ed9fc1444f507b7422b690b36926cb57616e9e
    JoeLoser authored and facebook-github-bot committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    a8ada31 View commit details
    Browse the repository at this point in the history
  3. Allocate the IOBuf object and the SharedInfo in a single memory alloc…

    …ation
    
    Summary: Allocate the IOBuf object and the SharedInfo in a single memory allocation
    
    Reviewed By: yfeldblum, simpkins
    
    Differential Revision: D13580880
    
    fbshipit-source-id: cde0eb48c00b9310d0540edb4a9c2d64d6f44a5d
    dmm-fb authored and facebook-github-bot committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    92bb5d8 View commit details
    Browse the repository at this point in the history
  4. Update README to reflect min supported GCC version (#997)

    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: #997
    
    Reviewed By: markisaa
    
    Differential Revision: D13648256
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: c694ea0af0c63bd4ec16eb2a8a3e2d95b5801f4d
    JoeLoser authored and facebook-github-bot committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    49ec4f6 View commit details
    Browse the repository at this point in the history
  5. Other approach to fix issues with double comparisons

    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
    tau0 authored and facebook-github-bot committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    3364055 View commit details
    Browse the repository at this point in the history
  6. Use HHWheelTimer in the FiberManager

    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
    spalamarchuk authored and facebook-github-bot committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    f7548ce View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2019

  1. Fix a race in TLRefCount

    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
    andriigrynenko authored and facebook-github-bot committed Jan 17, 2019
    Configuration menu
    Copy the full SHA
    8757861 View commit details
    Browse the repository at this point in the history
  2. Add README

    Reviewed By: lewissbaker
    
    Differential Revision: D13706612
    
    fbshipit-source-id: a7c604dbb9216430cc30d63a7fe78530afad585c
    andriigrynenko authored and facebook-github-bot committed Jan 17, 2019
    Configuration menu
    Copy the full SHA
    96f5111 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2019

  1. Build executor Cython extension (#992)

    Summary:
    setup.py to create folly Cython bindings
    
    Minimum required to get fbthrift to compile in OSS, so only includes executor
    
    Cython requires that source files (pyx and pxd) are in a directory matching the extension name, to provide this a tree of symbolic links is created and the Cython compile happens in that directory.
    
      - Python3 > 3.6 available?
      - Cython installed?
    Pull Request resolved: #992
    
    Reviewed By: simpkins
    
    Differential Revision: D13716102
    
    Pulled By: calebmarchent
    
    fbshipit-source-id: 5fb285b0b43e8b6d1774fa4b6f2525c327cbcc7e
    Caleb Marchent authored and facebook-github-bot committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    2bacf89 View commit details
    Browse the repository at this point in the history
  2. Don't call SSL_shutdown when SSL_accept is pending

    Summary: As it says on tin.
    
    Reviewed By: knekritz
    
    Differential Revision: D13144407
    
    fbshipit-source-id: 8fc69f9005ca54c2fb82b501547de2aaa892c1fa
    Alex Guzman authored and facebook-github-bot committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    2ea73e0 View commit details
    Browse the repository at this point in the history
  3. Disable renegotiation in OpenSSL 1.1.x

    Summary: Adds option to wangle's SSLContextManager to disable renegotiation explicitly and makes folly's AsyncSSLSocket report rejected renegotiations from 1.1.x
    
    Reviewed By: siyengar
    
    Differential Revision: D13633405
    
    fbshipit-source-id: 2b0fc5af4a12795efb52795d64b18b7b6c87e334
    Alex Guzman authored and facebook-github-bot committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    b1fd4e1 View commit details
    Browse the repository at this point in the history
  4. Backport std::bit_cast

    Summary: Backport `std::bit_cast` from C++20.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13705428
    
    fbshipit-source-id: a4b284563be67bec3fe4ddb54fed299650458d30
    aary authored and facebook-github-bot committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    93173f5 View commit details
    Browse the repository at this point in the history
  5. Basic co_bt gdb script for coro::Task

    Summary:
    This is mostly a POC. It will probably fail in some cases, but it's better than nothing.
    Sample output:
      (gdb) co_bt this
      0x292d70 <zero()>
      0x293f50 <one()>
      0x295050 <two()>
      0x296150 <three()>
      0x297250 <folly::coro::TaskWithExecutor<int>::start() &&::{lambda(folly::Promise<int>, folly::coro::TaskWithExecutor<int>)#1}::operator()(folly::Promise<int>, folly::coro::TaskWithExecutor<int>) const>
    
    Reviewed By: jwiepert
    
    Differential Revision: D13727139
    
    fbshipit-source-id: bff98eb4f5eb2ebd73c880d3b525172782f87511
    andriigrynenko authored and facebook-github-bot committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    960bd85 View commit details
    Browse the repository at this point in the history
  6. Remove workaround for lack of std::atomic_init (#996)

    Summary:
    - Since GCC 5 and later has `std::atomic_init`, remove the workaround
      present in `Tearable.h` to default initialize atomic variables.
    - Default initialization of atomics do not work as you would expect. See
      http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0883r0.pdf
      for the explanation why.
    - To get around the default initialization issue, we just call
      `std::atomic_init` for each element in the array of atomics.
    Pull Request resolved: #996
    
    Reviewed By: LeeHowes
    
    Differential Revision: D13648263
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: 6f3c84089f9158bc5c0ad5efac13d49ef69f1770
    JoeLoser authored and facebook-github-bot committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    05c10a5 View commit details
    Browse the repository at this point in the history
  7. SingletonRelaxedCountable

    Summary: [Folly] `SingletonRelaxedCountable`, a convenience API around `SingletonRelaxedCounter` for counting instances of a type.
    
    Reviewed By: ovoietsa
    
    Differential Revision: D13686867
    
    fbshipit-source-id: b2f7673e7e88c473337f66901c3e787d35eca6c6
    yfeldblum authored and facebook-github-bot committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    d9e3b6c View commit details
    Browse the repository at this point in the history
  8. Use <random> instead of boost/random (#1000)

    Summary:
    - Use `std::mt19937` instead of `boost::random::mt19937`.
    - Use `std::uniform_int_distribution` instead of `boost::uniform_int`.
    Pull Request resolved: #1000
    
    Reviewed By: aary
    
    Differential Revision: D13729752
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: 26828c157c458e56ce225af25e2a96890f0633ab
    JoeLoser authored and facebook-github-bot committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    4ab37c8 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2019

  1. LifoSemMPMCQueue: Throw only when queue is full not when consumer is …

    …in progress.
    
    Summary:
    This change ensures that LifoSemMPMCQueue and PriorityLifoSemMPMCQueue do not throw unless the queue is full.
    
    Before this change it was possible for an add operation to throw even when the queue is not full, if a consumer operation is delayed while in progress.
    
    Example:
    Queue of size N.
    T1: Producer completes N add operations.
    T2: Consumer starts a take operation and gets delayed.
    T3: Consumer completes N-1 take operations.
    T1: Tries an add operation. If using MPMCQueue::write (which returns false) throws even though the queue is not full (has N-1 empty slots). If using MPMCQueue::writeIfNotFull() returns true after waiting for T2's take to complete.
    
    This is somewhat similar to BugD3527722.
    
    Reviewed By: djwatson
    
    Differential Revision: D13701978
    
    fbshipit-source-id: a799353c41d0dc6e673b5fe0ad2a64fd5440fbe8
    magedm authored and facebook-github-bot committed Jan 19, 2019
    Configuration menu
    Copy the full SHA
    d5be302 View commit details
    Browse the repository at this point in the history
  2. Add test that LifoSemMPMCQueue::add does not throw when queue is not …

    …full
    
    Summary:
    Add test to ThreadPoolTest that LifoSemMPMCQueue::add does not throw when queue is not full.
    
    The test fails before changing LifoSemMPMCQueue::add to use MPMCQueue::writeIfNotFull instead of MPMCQueue::write,and passes after the change.
    
    Reviewed By: djwatson
    
    Differential Revision: D13722155
    
    fbshipit-source-id: 09e296f18eba5c3a78734284b5e409cf006951cc
    magedm authored and facebook-github-bot committed Jan 19, 2019
    Configuration menu
    Copy the full SHA
    f08d42c View commit details
    Browse the repository at this point in the history
  3. Use std::array instead of std::vector for bitmap

    Summary: The size of the vector is essentially 4, there's no point of allocating it on heap. This improves locality and avoids unnecessary indirection.
    
    Reviewed By: jmswen
    
    Differential Revision: D13709524
    
    fbshipit-source-id: 76c80b835a73ec8f7f5096ae927292571d137596
    spalamarchuk authored and facebook-github-bot committed Jan 19, 2019
    Configuration menu
    Copy the full SHA
    0f1c675 View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2019

  1. Add unique_lock and lock_guard support for DistributedMutex

    Summary:
    This adds support for the Lockable concept for DistributedMutex through a
    unique_lock specialization.  There is also a corresponding lock_guard
    specialization.  This should cover 95% of usecases very well.  The other 5%
    should probably consider using std::unique_lock, std::lock_guard or
    folly::Synchronized
    
    Note that std::unique_lock and std::lock_guard can be specialized.  The
    standard does not explicitly prevent specializations for these classes as long
    as the specializations are dependent on user-defined classes.  This makes it
    ok for us to specialize these two interfaces for our folly mutexes.  See the
    quoted paragraph below
    
    Section §[namespace.std]
    
    > A program may add a template specialization for any standard library
    > template to namespace std only if the declaration depends on a user-defined
    > type and the specialization meets the standard library requirements for the
    > original template and is not explicitly prohibited.
    
    The generic lockable wrappers that implement the std::unique_lock and
    std::lock_guard interfaces are present in
    folly/synchronization/detail/ProxyLockable.h.  The specializations of
    std::unique_lock and std::lock_guard in namespace std use these
    implementations.  This allows us to stick with a simple specialization for our
    mutex, which is well-defined per the paragraph above
    
    Reviewed By: djwatson
    
    Differential Revision: D10377227
    
    fbshipit-source-id: 9f2c50ff5732714c83a79752f58c792e6b2a5e88
    aary authored and facebook-github-bot committed Jan 21, 2019
    Configuration menu
    Copy the full SHA
    541198d View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2019

  1. document the non-standard compliance of erase()

    Summary: See F14.md changes.
    
    Reviewed By: nbronson
    
    Differential Revision: D13722323
    
    fbshipit-source-id: 70c68442cad56efc84bb29f0b694a7b71f837cbd
    shixiao authored and facebook-github-bot committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    d6ab7bc View commit details
    Browse the repository at this point in the history
  2. Add unique_lock construction utility

    Summary:
    Until C++17 constructor type deduction becomes a thing, we can use this
    instead to mimic unique_lock construction without having to specify the type
    of the mutex explicitly.
    
    ```
    auto lck = folly::make_unique_lock(mutex);
    
    // as opposed to
    
    auto lck = std::unique_lock<MutexType>{mutex};
    ```
    
    Reviewed By: davidtgoldblatt
    
    Differential Revision: D10386999
    
    fbshipit-source-id: 0780a6d1769597a3888305248bcdf93a84c9f9ee
    aary authored and facebook-github-bot committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    fde4f26 View commit details
    Browse the repository at this point in the history
  3. ReadMostlyMainPtr: Add a stress test.

    Summary:
    The other tests are either simple API tests for single-threaded cases, or a
    benchmark.
    
    Reviewed By: djwatson
    
    Differential Revision: D13678336
    
    fbshipit-source-id: 5aba91879d756097f42d245b5d318ad7c945dfeb
    davidtgoldblatt authored and facebook-github-bot committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    e9eae3a View commit details
    Browse the repository at this point in the history
  4. add a test case for SCOPE_FAIL with std::rethrow_exception()

    Summary:
    Make sure SCOPE_FAIL works with std::rethrow_exception().
    
    When compiled with older versions of gcc this code would fail due to a gcc
    bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62258
    The gcc bug was fixed in 4.9.4, 5.3, and the 6.0 branch.
    
    Reviewed By: meyering
    
    Differential Revision: D3280778
    
    fbshipit-source-id: 8fe1a9c1dc3ada61c8ebd7318538ae959b29a6b1
    simpkins authored and facebook-github-bot committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    5f99ab6 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2019

  1. Tweak deletion of fbstring::operator= taking convertible-to char

    Summary: [Folly] Tweak deletion of `fbstring::operator=` taking convertible-to `char`.
    
    Reviewed By: Orvid
    
    Differential Revision: D13747744
    
    fbshipit-source-id: f254f13a15cb0e72120d1d02f4c8893a788e429a
    yfeldblum authored and facebook-github-bot committed Jan 23, 2019
    Configuration menu
    Copy the full SHA
    8946c3b View commit details
    Browse the repository at this point in the history
  2. fix coro example in readme

    Summary: was reading coro example and i think a line is missing
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D13788989
    
    fbshipit-source-id: ceb024a36ddd89369ee25f6632fce8d339c489cb
    larabear authored and facebook-github-bot committed Jan 23, 2019
    Configuration menu
    Copy the full SHA
    8f7f677 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2019

  1. Change T_CHECK_TIMEOUT and T_CHECK_TIME_LT to fail tests instead of s…

    …kipping them
    
    Summary:
    Most of the tests that use this macro, use it to ensure proper behavior of time-related logic (i.e. timeout didn't fire too early/late). Skipping them, simply masks a failure. The underlying utility already takes care of lags due to scheduling, so whenever this check fails - means we have a bug.
    
    In particular, we have 3 tests for HHWheelTimer that are always skipped, because their tolerance is below the expected lag of HHWheelTimer (it always rounds up, so we should expect +1ms always).
    
    Reviewed By: vitaut
    
    Differential Revision: D13746558
    
    fbshipit-source-id: 78f954f52414e640af92e5bb50790135cdd89a92
    spalamarchuk authored and facebook-github-bot committed Jan 24, 2019
    Configuration menu
    Copy the full SHA
    c612fab View commit details
    Browse the repository at this point in the history
  2. Cut pushmi example which uses non-yet-std names

    Summary: [Folly] Cut `pushmi` example which uses non-yet-`std` names.
    
    Reviewed By: kirkshoop
    
    Differential Revision: D13777367
    
    fbshipit-source-id: 7ae846e74b622fb0f434220961d35bb243be6868
    yfeldblum authored and facebook-github-bot committed Jan 24, 2019
    Configuration menu
    Copy the full SHA
    65e5d94 View commit details
    Browse the repository at this point in the history
  3. executor with priority

    Summary: make an adapter executor that forwards add to addWithPriority of the underlying executor
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D13788642
    
    fbshipit-source-id: 5b4af43f4a3a3931817a2425890558f811152225
    larabear authored and facebook-github-bot committed Jan 24, 2019
    Configuration menu
    Copy the full SHA
    e66fcd5 View commit details
    Browse the repository at this point in the history
  4. Fix FutureAwaitable to work with tail-call optimization

    Summary: setCallback_ is an internal API that doesn't provide a guarantee that when the callback is run the Try will be stored inside of the original future. Thus the Try should be moved by the callback instead.
    
    Reviewed By: LeeHowes
    
    Differential Revision: D13793991
    
    fbshipit-source-id: 1e8c4e423b8e1786099cae84bd99ac350c32d937
    andriigrynenko authored and facebook-github-bot committed Jan 24, 2019
    Configuration menu
    Copy the full SHA
    446a5a2 View commit details
    Browse the repository at this point in the history
  5. Removed outdated comment.

    Summary: Got outdated in D3143931.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13494612
    
    fbshipit-source-id: e24bfea36896ec04b15fa443348e00f50f75940d
    mpark authored and facebook-github-bot committed Jan 24, 2019
    Configuration menu
    Copy the full SHA
    74ea538 View commit details
    Browse the repository at this point in the history
  6. Avoid unnecessary looping over bitmap when scheduling new timeouts

    Summary:
    Current implementation will loop over bitmap to figure out next tick to schedule. This consumes visible amount of CPU (10% in fibers benchmark, ~4% of Thrift noop load test).
    
    However, this looping is unnecessary, because we already have all information available - what is the earliest pre-existing timeout (expireTick_) and the new one. So we can decide what tick to schedule for by just simple conditional statement.
    
    Reviewed By: vitaut
    
    Differential Revision: D13709523
    
    fbshipit-source-id: b0e3e6301cc2e759b4e8901ba5ff009587516cf5
    spalamarchuk authored and facebook-github-bot committed Jan 24, 2019
    Configuration menu
    Copy the full SHA
    8b47e56 View commit details
    Browse the repository at this point in the history
  7. Remove "movable buffers" codepath in AsyncSSLSocket

    Reviewed By: yfeldblum
    
    Differential Revision: D13800383
    
    fbshipit-source-id: 61b988182cb8da6f084b62a0879f0ca917f8ad34
    mingtaoy authored and facebook-github-bot committed Jan 24, 2019
    Configuration menu
    Copy the full SHA
    1952cd0 View commit details
    Browse the repository at this point in the history
  8. hazptr: Apply timed reclamation to tagged and untagged lists

    Summary: Apply timed reclamation to tagged and untagged lists to avoid accumulating a large amount of unreclaimed memory in use cases with large protectable structures.
    
    Reviewed By: davidtgoldblatt
    
    Differential Revision: D13779937
    
    fbshipit-source-id: e2e14ac5f18c1ee30808116cbc29d21895d9fb1c
    magedm authored and facebook-github-bot committed Jan 24, 2019
    Configuration menu
    Copy the full SHA
    fd241ff View commit details
    Browse the repository at this point in the history
  9. Make EventBase destruction callbacks safely cancellable

    Summary: Currently, `runOnDestruction` aims to be thread-safe; new callbacks are added to the `onDestructionCallbacks_` list while the associated mutex is held. However, the caller may own the `LoopCallback` and wish to destroy/cancel it before the `EventBase` destructor runs, and this callback cancellation is not thread-safe, since unlinking does not happen under the lock protecting `onDestructionCallbacks_`. The primary motivation of this diff is to make on-destruction callback cancellation thread-safe; in particular, it is safe to cancel an on-destruction callback concurrently with `~EventBase()`.
    
    Reviewed By: spalamarchuk
    
    Differential Revision: D13440552
    
    fbshipit-source-id: 65cee1e361d37647920baaad4490dd26b791315d
    jmswen authored and facebook-github-bot committed Jan 24, 2019
    Configuration menu
    Copy the full SHA
    ffff09d View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2019

  1. Improve FutureAwaitable::await_ready

    Summary: This helps avoid executor re-schedule when Future is ready.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13805939
    
    fbshipit-source-id: f553c7a581882a7b53b004fd6bbb5087ea5787f8
    andriigrynenko authored and facebook-github-bot committed Jan 25, 2019
    Configuration menu
    Copy the full SHA
    960770d View commit details
    Browse the repository at this point in the history
  2. thrift: plumb rsocket into cmake build

    Summary: The headers are installed, but we weren't compiling the implementation.
    
    Reviewed By: simpkins
    
    Differential Revision: D13778568
    
    fbshipit-source-id: 4d297b732d1e70bbd69100f13eb68f9477d7f014
    wez authored and facebook-github-bot committed Jan 25, 2019
    Configuration menu
    Copy the full SHA
    504981e View commit details
    Browse the repository at this point in the history
  3. Task::start with a callback

    Summary: This is useful to avoid extra allocations when integrating with code that doesn't use folly::futures.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13812866
    
    fbshipit-source-id: aa76b8cda43d1a781e058f6edbe2ecb8100268de
    andriigrynenko authored and facebook-github-bot committed Jan 25, 2019
    Configuration menu
    Copy the full SHA
    648fd36 View commit details
    Browse the repository at this point in the history
  4. rsocket: add fbcode builder bits

    Summary:
    This should allow more direct testing of changes without waiting for things to land on github first.
    
    As part of this, to avoid a conflict between the deps that bistro downloads and those used by
    the rest of the fbcode builder CI, I've updated the version of gtest used by bistro.
    
    Reviewed By: zertosh
    
    Differential Revision: D13802637
    
    fbshipit-source-id: fd71bfabd2a85f4f63c21b44a1e868f2d293180a
    wez authored and facebook-github-bot committed Jan 25, 2019
    Configuration menu
    Copy the full SHA
    821d508 View commit details
    Browse the repository at this point in the history
  5. Add an HHWheelTimer-fwd.h header

    Summary: Add an HHWheelTimer-fwd.h header
    
    Reviewed By: djwatson
    
    Differential Revision: D13780411
    
    fbshipit-source-id: 795352c3eeed38cd52a270ebdf5dd734604415fa
    dmm-fb authored and facebook-github-bot committed Jan 25, 2019
    Configuration menu
    Copy the full SHA
    3339cfb View commit details
    Browse the repository at this point in the history
  6. Don't hold GlobalCache mutex while scheduling OnDestruction callback

    Summary:
    Title. This gets rid of benign TSAN lock order inversion detections.
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: spalamarchuk
    
    Differential Revision: D13820662
    
    fbshipit-source-id: f092a988faa2cc897a1d046385e4bc4fd0422c7c
    jmswen authored and facebook-github-bot committed Jan 25, 2019
    Configuration menu
    Copy the full SHA
    4a0367d View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2019

  1. Cut various sites supporting MSVC <= 2015

    Summary: [Folly] Cut various sites supporting MSVC <= 2015, which is insufficiently compatible.
    
    Reviewed By: Orvid
    
    Differential Revision: D13747631
    
    fbshipit-source-id: 3d63d3a57258b5695b1236a81f3ddfe2f4af9cb4
    yfeldblum authored and facebook-github-bot committed Jan 26, 2019
    Configuration menu
    Copy the full SHA
    d129ad4 View commit details
    Browse the repository at this point in the history
  2. fbcode_builder: add VERBOSE=1 to make invocations

    Summary: This makes it easier to debug and diagnose build problems
    
    Reviewed By: simpkins
    
    Differential Revision: D13831342
    
    fbshipit-source-id: 3921a05715fb00264b2e1a6e134686d68aea804d
    wez authored and facebook-github-bot committed Jan 26, 2019
    Configuration menu
    Copy the full SHA
    bf08464 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2019

  1. Remove thenError dependence on onError

    Summary:
    * Split thenError into future-returning and not-future-returning forms as we cannot rely on onError for this.
     * Move core functionality from onError into thenError to avoid thenError depending on onError.
     * Makes thenError's continuation consistent with other forms such that the parameter is passed by r-value, hence an l-value reference is no longer valid.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13820171
    
    fbshipit-source-id: cf42a7d1c0759c5cfbb03f8e66a6d6988f7e10c7
    LeeHowes authored and facebook-github-bot committed Jan 27, 2019
    Configuration menu
    Copy the full SHA
    4fd1f3a View commit details
    Browse the repository at this point in the history
  2. Add duration_cast when printing expected ms

    Summary: As per Yedidya Feldblum comment on my previous diff, we need a duration cast in here.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13833032
    
    fbshipit-source-id: 8819694875bd3a7e4f54102d8ac77490f8287fbb
    spalamarchuk authored and facebook-github-bot committed Jan 27, 2019
    Configuration menu
    Copy the full SHA
    0e818b2 View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2019

  1. Make onError depend on thenError

    Summary: Remove duplicate code from Future::onError and have it call Future::thenError.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13823960
    
    fbshipit-source-id: d2e48e4e65e30c80adbbd70ff314e1a418b7c1e2
    LeeHowes authored and facebook-github-bot committed Jan 28, 2019
    Configuration menu
    Copy the full SHA
    b29280e View commit details
    Browse the repository at this point in the history
  2. Apply clang-format to folly/FBString.h

    Summary: [Folly] Apply `clang-format` to `folly/FBString.h`. A previous change was not properly formatted.
    
    Reviewed By: ot
    
    Differential Revision: D13831558
    
    fbshipit-source-id: 318404a3a14d6969cc2aa9601e72fae6ad6cfac2
    yfeldblum authored and facebook-github-bot committed Jan 28, 2019
    Configuration menu
    Copy the full SHA
    5f53551 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2019

  1. Disable non-const access from upgrade locks

    Summary:
    Upgrade locks allow access concurrently with readers, so mutating the state under an upgrade lock can potentially introduce a race unless proven otherwise.
    The main goal of this diff is to make the accessors to `Synchronized` state `const` under upgrade lock, as it happens under a shared lock. To achieve so, the diff changes the mechanism by which `const` is added: instead of unconditionally closing a `const Synchronized` in the `LockedPtr`, it captures the same constness as the `Synchronized`, and then the `const` decision is done at access time.
    
    This enables having an extra method `asNonConstUnsafe()` that gives non-const access when needed without requiring a `const_cast`. This is now provided for shared locks as well.
    
    Reviewed By: yfeldblum, aary, davidtgoldblatt
    
    Differential Revision: D13817413
    
    fbshipit-source-id: 8c315a925db9b1da8821984c59e55e90571b194e
    ot authored and facebook-github-bot committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    a238a68 View commit details
    Browse the repository at this point in the history
  2. Replace value_before with std::prev

    Summary:
    `value_before` looks like a pre-C++11 artifact, replace with `std::prev`.
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13852269
    
    fbshipit-source-id: c2e4e8178754a694650f53633f099d05da4127d7
    ot authored and facebook-github-bot committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    91bc2fb View commit details
    Browse the repository at this point in the history
  3. A generic tag type

    Summary: [Folly] A generic tag type for all your generic tag-related needs. With naming following the pattern of `std::in_place_t` and `std::in_place`.
    
    Reviewed By: kirkshoop
    
    Differential Revision: D13855499
    
    fbshipit-source-id: 50b7e41fbbb843c6c9b766f8b66484d6aa23c167
    yfeldblum authored and facebook-github-bot committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    515bf2b View commit details
    Browse the repository at this point in the history
  4. SemiFuture::deferError and Future::thenError taking tag

    Summary: [Folly] SemiFuture::deferError and Future::thenError overloads taking exception-type-carrying tag to distinguish the exception type. Solves the case where `.deferError` or `.thenError` is called on an object with a dependent type, where passing the exception type otherwise requires the `template` keyword.
    
    Reviewed By: LeeHowes
    
    Differential Revision: D13855497
    
    fbshipit-source-id: 74200853043e3fdbc08419b33b959f3519d704ef
    yfeldblum authored and facebook-github-bot committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    f44d1a0 View commit details
    Browse the repository at this point in the history
  5. Fix Windows build

    Summary: It was broken due to oddities with how MSVC handles expanding `##__VA_ARGS__` within the parameters to macros. Rather than deal with the pre-processor, just return the check to how it was and use `EXPECT_TRUE(false)` to achieve the same effect.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13850142
    
    fbshipit-source-id: 887b39fb3c6072219c3f4748599bc7b707efbf25
    Orvid authored and facebook-github-bot committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    99007fc View commit details
    Browse the repository at this point in the history
  6. Remove uneeded boost/random includes

    Summary: They aren't needed
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13855963
    
    fbshipit-source-id: c822a4b806350ef178906401b2239a865fd77119
    Orvid authored and facebook-github-bot committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    1318513 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2019

  1. Apply clang-format to non-compliant locations (partial)

    Summary:
    [Folly] Apply `clang-format` to non-compliant locations (partial).
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: igorsugak
    
    Differential Revision: D13858983
    
    fbshipit-source-id: 668c3ee209456befd3c03d85945321143da2b00a
    yfeldblum authored and facebook-github-bot committed Jan 30, 2019
    Configuration menu
    Copy the full SHA
    1fd2425 View commit details
    Browse the repository at this point in the history
  2. Add some more OpenSSL 1.1.0 compat functions

    Summary: Adds functions for DH length to the compat library.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13584117
    
    fbshipit-source-id: ef753d58ee400fbaf8d47f59b7d39e17380ed417
    Alex Guzman authored and facebook-github-bot committed Jan 30, 2019
    Configuration menu
    Copy the full SHA
    7ad4254 View commit details
    Browse the repository at this point in the history
  3. Reserve the vectors in ConcurrentHashMapTest (#998)

    Summary:
    Even though this is a test, we are still reallocating a vector (resizing until re-sized/reallocated to 32), which in theory calls for allocation 5 times. But we can save this by just reserving the vector pre-hand (we know the size).
    Pull Request resolved: #998
    
    Reviewed By: magedm
    
    Differential Revision: D13834292
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: 6b0d16ef0200184d10ba292a0b1d8d3afdadf56d
    shahzadlone authored and facebook-github-bot committed Jan 30, 2019
    Configuration menu
    Copy the full SHA
    6db47e8 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2019

  1. Include folly_pic in the opensource installed targets

    Summary: Pull Request resolved: #1006
    
    Reviewed By: Orvid
    
    Differential Revision: D13782299
    
    Pulled By: calebmarchent
    
    fbshipit-source-id: 7662c67a18c10a04d8d68e3f729da81c6df38336
    Caleb Marchent authored and facebook-github-bot committed Jan 31, 2019
    Configuration menu
    Copy the full SHA
    ff84138 View commit details
    Browse the repository at this point in the history
  2. add copy constructor for KeepAlive

    Summary:
    There is a need for KeepAlive copy constructor from various users. Adding them after chatting with Andrii.
    Background: move is preferred to copy as the latter does an atomic counter increment. `copy()` was introduced but there is a need for more user-friendly way of copying.
    TODO: maybe get rid of `copy()` and its usages?
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D13864057
    
    fbshipit-source-id: 38b2e45285566a3c2dba01706e82f421285b6bae
    larabear authored and facebook-github-bot committed Jan 31, 2019
    Configuration menu
    Copy the full SHA
    291c761 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2019

  1. folly::chrono::abs, backporting std::chrono::abs

    Summary: [Folly] `folly::chrono::abs`, backporting `std::chrono::abs`.
    
    Reviewed By: nbronson
    
    Differential Revision: D13584287
    
    fbshipit-source-id: 92adbfcdac34d89674e6494af4ff3329d2f6974a
    yfeldblum authored and facebook-github-bot committed Feb 1, 2019
    Configuration menu
    Copy the full SHA
    6f276e2 View commit details
    Browse the repository at this point in the history
  2. AsyncSSLSocket::newSocket fd to NetworkSocket overload

    Summary: So that the fd overload can be removed.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13628683
    
    fbshipit-source-id: 5201d3ef351042ebaf2d30c3987b931f8d13d336
    Orvid authored and facebook-github-bot committed Feb 1, 2019
    Configuration menu
    Copy the full SHA
    0c267af View commit details
    Browse the repository at this point in the history
  3. Ensure that remaining thenError case takes an r-value exception and f…

    …ix tests to check for it
    
    Summary:
    Fixes a missed r-value parameter case for exceptions passed to thenError continuations.
    
    Adds tests to separate l-value for onError from r-value from thenError.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13928271
    
    fbshipit-source-id: 0a720730d32c158fb82b61dccd0426b1fe55169f
    LeeHowes authored and facebook-github-bot committed Feb 1, 2019
    Configuration menu
    Copy the full SHA
    f1d6c61 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2019

  1. Properly handle negative timeouts

    Summary:
    We're always scheduling negative timeouts to fire immediately. However, there's a branch with invalid timeout that may end up getting us into an invalid state (in particular, setting negative `expireTick_`).
    
    To avoid that, this adds input sanitization by making sure we don't have anything negative.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13934881
    
    fbshipit-source-id: 28d7dc48f57da67d3266a7f33e058ff6994eb756
    spalamarchuk authored and facebook-github-bot committed Feb 2, 2019
    Configuration menu
    Copy the full SHA
    055fce5 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2019

  1. Reduce log level on setLockTypes warning in openssl 1.1.0.

    Summary: We do not need this spammy logging.
    
    Reviewed By: siyengar, mingtaoy
    
    Differential Revision: D13950327
    
    fbshipit-source-id: 6fc91d3efa27d2d88ab7571233ce04a6e28b15f7
    knekritz authored and facebook-github-bot committed Feb 5, 2019
    Configuration menu
    Copy the full SHA
    9a4e7a7 View commit details
    Browse the repository at this point in the history
  2. Install executor_api.h when generated in OSS build (#1010)

    Summary:
    futures.h includes folly/python/executor_api.h, this header needs to be
    available to downstream projects (Thrift) which use python/futures.h.
    Pull Request resolved: #1010
    
    Reviewed By: Orvid
    
    Differential Revision: D13915880
    
    Pulled By: calebmarchent
    
    fbshipit-source-id: 3c47fc4fe4ba425a4c12dcefd8980703765bdad5
    Caleb Marchent authored and facebook-github-bot committed Feb 5, 2019
    Configuration menu
    Copy the full SHA
    5aaeba1 View commit details
    Browse the repository at this point in the history
  3. Add benchmarks similar to stringPrintf for folly::Format and fmt

    Summary:
    Basic benchmarks to validate performance of similar string
    formatting functions.  Notably, `stringPrintf` is always inferior to
    either format-based alternative.
    
    ```
    ============================================================================
    folly/test/StringBenchmark.cpp                  relative  time/iter  iters/s
    ============================================================================
    libc_tolower                                               714.38ns    1.40M
    folly_toLowerAscii                                          66.03ns   15.14M
    stringPrintfOutputSize(1)                                  170.06ns    5.88M
    stringPrintfOutputSize(4)                                  198.54ns    5.04M
    stringPrintfOutputSize(16)                                 202.94ns    4.93M
    stringPrintfOutputSize(64)                                 204.82ns    4.88M
    stringPrintfOutputSize(256)                                  1.32us  759.95K
    stringPrintfOutputSize(1024)                                 4.47us  223.70K
    stringPrintfAppendfBenchmark                                25.38ms    39.40
    fmtOutputSize(1)                                           104.62ns    9.56M
    fmtOutputSize(4)                                           121.50ns    8.23M
    fmtOutputSize(16)                                          125.27ns    7.98M
    fmtOutputSize(64)                                          125.59ns    7.96M
    fmtOutputSize(256)                                         633.15ns    1.58M
    fmtOutputSize(1024)                                          1.06us  939.38K
    fmtAppendfBenchmark                                          8.22ms   121.71
    follyFmtOutputSize(1)                                      122.76ns    8.15M
    follyFmtOutputSize(4)                                      149.51ns    6.69M
    follyFmtOutputSize(16)                                     148.90ns    6.72M
    follyFmtOutputSize(64)                                     147.45ns    6.78M
    follyFmtOutputSize(256)                                    150.71ns    6.64M
    follyFmtOutputSize(1024)                                   584.94ns    1.71M
    follyFmtAppendfBenchmark                                    11.39ms    87.79
    BM_cEscape                                                 321.10us    3.11K
    BM_cUnescape                                               290.97us    3.44K
    BM_uriEscape                                                 2.99us  333.92K
    BM_uriUnescape                                               1.56us  639.36K
    BM_unhexlify                                               525.33ps    1.90G
    splitOnSingleChar                                            1.21us  823.13K
    splitOnSingleCharFixed                                     466.79ns    2.14M
    splitOnSingleCharFixedAllowExtra                             0.00fs  Infinity
    splitStr                                                     1.86us  536.53K
    splitStrFixed                                              620.41ns    1.61M
    boost_splitOnSingleChar                                      2.34us  427.23K
    joinCharStr                                                947.58ns    1.06M
    joinStrStr                                                 956.37ns    1.05M
    joinInt                                                      2.24us  447.21K
    ============================================================================
    ```
    
    Reviewed By: vitaut
    
    Differential Revision: D13940303
    
    fbshipit-source-id: a26d984cde26b1a5eb3eba1935722cdcd221fe44
    Chip Turner authored and facebook-github-bot committed Feb 5, 2019
    Configuration menu
    Copy the full SHA
    241ea7b View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2019

  1. Add support for microsecond timers

    Summary: Add support for microsecond timers
    
    Reviewed By: spalamarchuk
    
    Differential Revision: D13765262
    
    fbshipit-source-id: ab5e2d876195a726dc654aee28cb40f695cf2277
    dmm-fb authored and facebook-github-bot committed Feb 6, 2019
    Configuration menu
    Copy the full SHA
    6b43343 View commit details
    Browse the repository at this point in the history
  2. Add tag_t to Futures.md

    Summary: Update futures documentation for consistency with tag type changes.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13975003
    
    fbshipit-source-id: 7015ffb8bd2b306e2dd31f6e2eb9e45b2618fa5f
    LeeHowes authored and facebook-github-bot committed Feb 6, 2019
    Configuration menu
    Copy the full SHA
    373e67a View commit details
    Browse the repository at this point in the history
  3. Add explicit deprecation to delayedUnsafe

    Summary: Deprecate delayedUnsafe to stop people adding it to code.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13949215
    
    fbshipit-source-id: ffc4eec113964a0b247f16f3c37f3f8c69fbb0df
    LeeHowes authored and facebook-github-bot committed Feb 6, 2019
    Configuration menu
    Copy the full SHA
    293afa6 View commit details
    Browse the repository at this point in the history
  4. Remove Executor* APIs

    Summary: Executor::KeepAlive<> is now implicitly constructible from Executor*.
    
    Reviewed By: capickett
    
    Differential Revision: D13954744
    
    fbshipit-source-id: 523a860a337429a995152dc7171c0f6e8be8cecb
    andriigrynenko authored and facebook-github-bot committed Feb 6, 2019
    Configuration menu
    Copy the full SHA
    0779c7f View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2019

  1. Fix SingletonRelaxedCounter in T::~T() of ThreadLocal<T>

    Summary:
    [Folly] Fix `SingletonRelaxedCounter` in `T::~T()` of `ThreadLocal<T>`.
    
    Given a type `T` which has a dtor which increments some `SingletonRelaxedCounter`, and given some use of a `ThreadLocal<T>` where, within some given thread, the only time `SingletonRelaexCounter` is incremented is in the `T` dtor, there would be a leak of the `LocalLifetime` and this leak would cause subsequent `SingletonRelaxedCounter::count()` to segfault with access to a deallocated local counter.
    
    C++ `thread_local` destructors run before `pthread` thread-specific destructors. If a `pthread` thread-specific destructor triggers initialization of a C++ `thread_local`, then that `thread_local` will be leaked in that its destructor will never be run.
    
    Fix this with `ThreadLocal` by detecting when `ThreadLocal` per-thread destructors have begun running. This is a larger issue with `pthread` thread-specific objects overall, but as long as we stick to using `ThreadLocal`, it can be papered over.
    
    Reviewed By: davidtgoldblatt
    
    Differential Revision: D13970469
    
    fbshipit-source-id: a4c7f36d2c0d63f8f0e363ddb9d35a44b027aea6
    yfeldblum authored and facebook-github-bot committed Feb 7, 2019
    Configuration menu
    Copy the full SHA
    9a9dfd3 View commit details
    Browse the repository at this point in the history
  2. Remove the fd overload of BlockingSocket::BlockingSocket()

    Summary: It's not needed
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13993615
    
    fbshipit-source-id: 7e53224d39502b96e13bff352dab778df4782a1c
    Orvid authored and facebook-github-bot committed Feb 7, 2019
    Configuration menu
    Copy the full SHA
    4435c33 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2019

  1. get folly/experimental/pushmi building with gcc-5 again

    Summary: Judging from the number of things that needed fixing, pushmi has been busted on gcc-5 for some time.
    
    Reviewed By: yfeldblum, kirkshoop
    
    Differential Revision: D13979146
    
    fbshipit-source-id: 95def0ef6289b41e116a55359476ffec91787706
    Eric Niebler authored and facebook-github-bot committed Feb 8, 2019
    Configuration menu
    Copy the full SHA
    de4ce89 View commit details
    Browse the repository at this point in the history
  2. logging: fix a crash when using logging after main() returns

    Summary:
    Fix a problem where `LoggerDB::get()` could crash when called after `main()`
    has returned.
    
    The `LoggerDBSingleton` object may have been destroyed already, so calling
    `LoggerDBSingleton::getDB()` was not allowed.  This updates the code to just
    store the singleton in a simple raw pointer, and only use the singleton helper
    object for flushing log handlers.
    
    Reviewed By: dmaone
    
    Differential Revision: D13984692
    
    fbshipit-source-id: a0c8550af367458ca39fefa9090e3165ad6a82bb
    simpkins authored and facebook-github-bot committed Feb 8, 2019
    Configuration menu
    Copy the full SHA
    4a2619f View commit details
    Browse the repository at this point in the history
  3. logging: move the fatal_helper test program to test/helpers

    Summary:
    Move `FatalHelper.cpp` to the new folly/logging/test/helpers directory created
    in D13984692.
    
    Reviewed By: yfeldblum, dmaone
    
    Differential Revision: D13994517
    
    fbshipit-source-id: e2b7e4b4f649fed5b882df47424d24e4fc4f717a
    simpkins authored and facebook-github-bot committed Feb 8, 2019
    Configuration menu
    Copy the full SHA
    b23981b View commit details
    Browse the repository at this point in the history
  4. folly: resolve ambiguous floor overload on macos

    Summary:
    This manifested once D13765262 landed, but is likely
    more closely related to the changes in D4375603:
    
    ```
    In file included from /Users/facebook/wez-fbsource/fbcode/watchman/external/folly/folly/io/async/TimeoutManager.cpp:21:
    /Users/facebook/wez-fbsource/fbcode/watchman/external/folly/folly/Chrono.h:153:32: error: call to 'floor' is ambiguous
      return detail::round_impl(d, floor<To>(d));
                                   ^~~~~~~~~
    /Users/facebook/wez-fbsource/fbcode/watchman/external/folly/folly/io/async/TimeoutManager.cpp:77:44: note: in instantiation of function template specialization 'folly::chrono::round<std::__1::chrono::duration<long
          long, std::__1::ratio<1, 1000> >, long long, std::__1::ratio<1, 1000000>, void>' requested here
      timeout_type timeout_ms = folly::chrono::round<timeout_type>(timeout);
                                               ^
    /usr/local/fbprojects/packages/xcode/104/xcode_10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono:444:1: note: candidate function [with _ToDuration =
          std::__1::chrono::duration<long long, std::__1::ratio<1, 1000> >, _Rep = long long, _Period = std::__1::ratio<1, 1000000>]
    floor(const duration<_Rep, _Period>& __d)
    ^
    /Users/facebook/wez-fbsource/fbcode/watchman/external/folly/folly/Chrono.h:127:14: note: candidate function [with To = std::__1::chrono::duration<long long, std::__1::ratio<1, 1000> >, Rep = long long, Period =
          std::__1::ratio<1, 1000000>, $3 = void]
    constexpr To floor(std::chrono::duration<Rep, Period> const& d) {
                 ^
    ```
    
    this diff resolves the ambiguity in favor of `folly::chrono::floor`.
    
    Reviewed By: bolinfest
    
    Differential Revision: D14000897
    
    fbshipit-source-id: 669dbf3573c3799cb21e14f247acc8d053afe746
    wez authored and facebook-github-bot committed Feb 8, 2019
    Configuration menu
    Copy the full SHA
    3f488e7 View commit details
    Browse the repository at this point in the history
  5. Implement blockingWait for coro::Task

    Reviewed By: lewissbaker
    
    Differential Revision: D14002394
    
    fbshipit-source-id: 8f0422d66c6b6859ec42a6ee5ea58c97e9a15de9
    andriigrynenko authored and facebook-github-bot committed Feb 8, 2019
    Configuration menu
    Copy the full SHA
    df20b64 View commit details
    Browse the repository at this point in the history
  6. EvictingCacheMap::insert

    Summary: Add insert method to mimic std::unordered_map::insert. Allows for insertion without overwriting an existing element.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13928583
    
    fbshipit-source-id: 54f0eb5069b753bcaca55b04c09968d12dceb5e3
    Adam Norton authored and facebook-github-bot committed Feb 8, 2019
    Configuration menu
    Copy the full SHA
    57e26df View commit details
    Browse the repository at this point in the history
  7. Shift calls of AsyncServerSocket.getSocket to AsyncServerSocket.getNe…

    …tworkSocket
    
    Summary: The file-descriptor backed API will be going away.
    
    Reviewed By: yfeldblum, ryantimwilson
    
    Differential Revision: D13603038
    
    fbshipit-source-id: d89d3a3836ab551ec92c2fb1f74248cc2119ba03
    Orvid authored and facebook-github-bot committed Feb 8, 2019
    Configuration menu
    Copy the full SHA
    44b142c View commit details
    Browse the repository at this point in the history
  8. Remove AsyncSocket.getFd

    Summary: It's dead now.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13629451
    
    fbshipit-source-id: f4a79919ba20a13b6afd59b5e4605bf8faa3c6ad
    Orvid authored and facebook-github-bot committed Feb 8, 2019
    Configuration menu
    Copy the full SHA
    5bcb4a7 View commit details
    Browse the repository at this point in the history
  9. Detect libc++ std version in folly::chrono backports

    Summary: [Folly] Detect libc++ std version in `folly::chrono` backports, since libc++ does not define the recommended feature macros.
    
    Reviewed By: wez
    
    Differential Revision: D14002296
    
    fbshipit-source-id: 022085658aee3a453c5aea714f75f27013825c6f
    yfeldblum authored and facebook-github-bot committed Feb 8, 2019
    Configuration menu
    Copy the full SHA
    7f0aea2 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2019

  1. Make Init non-moveable

    Summary: [Folly] Make Init non-moveable to break code that could trigger early invocation of the moved-from instance's destructor when copy elision is not applied.
    
    Reviewed By: markisaa
    
    Differential Revision: D14002508
    
    fbshipit-source-id: faf8de587c0573d14d9b1082b7f531e147c48ed7
    yfeldblum authored and facebook-github-bot committed Feb 9, 2019
    Configuration menu
    Copy the full SHA
    35b194e View commit details
    Browse the repository at this point in the history
  2. Add an option to use clientAddress hash to despatch UDP packets.

    Summary:
    Currently udp socket send packet to listener in a round robin fashion. This will cause issue if there are more than one packet in one "session". Because packets from one session could be routed to two different listeners.
    
    This diff added a packet dispatch option which use clientAddress (address family + ip + port) hashing. In this way, the packets from same client will always routed to same listener when the total number of listener is consistent.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13994665
    
    fbshipit-source-id: e450c2fcbc95c55cb37cb5cda13c5df6d8119812
    Dongyi Ye authored and facebook-github-bot committed Feb 9, 2019
    Configuration menu
    Copy the full SHA
    150a10c View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2019

  1. Always define FOLLY_HAS_RTTI

    Summary: [Folly] Always define `FOLLY_HAS_RTTI` to either `0` or `1`.
    
    Reviewed By: LeeHowes
    
    Differential Revision: D14018830
    
    fbshipit-source-id: 5212f3f6269067fc6326e293cedb243e650f71db
    yfeldblum authored and facebook-github-bot committed Feb 10, 2019
    Configuration menu
    Copy the full SHA
    df5a057 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2019

  1. Improve rangeAdjust to accept and return a template type instead of…

    … ValueType
    
    Summary: Right now we invoke ValueType ctor (e.g. `ValueType(bucket.count)`) to calculate range adjust for long values, but ValueType can be any type and it should not have a ctro which accepts long
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13986728
    
    fbshipit-source-id: e5b8d826d14fb4c889047b97d88df35654119849
    Skory authored and facebook-github-bot committed Feb 11, 2019
    Configuration menu
    Copy the full SHA
    6cb3ae2 View commit details
    Browse the repository at this point in the history
  2. EvictingCacheMap::erase(const_iterator)

    Summary: Allows erase without a re-hash into index_ when we already have an iterator
    
    Reviewed By: aary
    
    Differential Revision: D13928691
    
    fbshipit-source-id: d662dc72cd8a07cdbd874cb6a3517f68ef320d80
    Adam Norton authored and facebook-github-bot committed Feb 11, 2019
    Configuration menu
    Copy the full SHA
    56051ae View commit details
    Browse the repository at this point in the history
  3. Replace boost::noncopyable with deleted copy constructors

    Summary: Pull Request resolved: #1014
    
    Reviewed By: lbrandy
    
    Differential Revision: D14019229
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: dd07d567a7f176a3bb0e18f7a19c3babfe2d431d
    JoeLoser authored and facebook-github-bot committed Feb 11, 2019
    Configuration menu
    Copy the full SHA
    eba1ff7 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2019

  1. Fix StaticSingletonManager inline fast path under gcc

    Summary: [Folly] Fix StaticSingletonManager inline fast path under gcc - code size for default-initialized `static std::atomic<...>` local is large, but when value-initialized is trivial.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D14018861
    
    fbshipit-source-id: e767ea3e46c3e3317f7b60008bc77f64edb2dea0
    yfeldblum authored and facebook-github-bot committed Feb 12, 2019
    Configuration menu
    Copy the full SHA
    0f03916 View commit details
    Browse the repository at this point in the history
  2. StaticSingletonManager without RTTI

    Summary: [Folly] `StaticSingletonManager` without RTTI as a variant, but without support for dynamic loading either.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D14018865
    
    fbshipit-source-id: d4eadc8924e6fec2cbb1dae957e311d80e9ce289
    yfeldblum authored and facebook-github-bot committed Feb 12, 2019
    Configuration menu
    Copy the full SHA
    670a8e0 View commit details
    Browse the repository at this point in the history
  3. AsyncSocket::newSocket fd to NetworkSocket overload

    Summary: The file descriptor overload will be going away.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13628834
    
    fbshipit-source-id: bc81ffdf011113479c95c1e8ae7deb4d0ff91e41
    Orvid authored and facebook-github-bot committed Feb 12, 2019
    Configuration menu
    Copy the full SHA
    9e3f865 View commit details
    Browse the repository at this point in the history
  4. Use std::is_trivially_destructible instead of boost::has_trivial_dest…

    …ructor (#1003)
    
    Summary:
    - Use `std::is_trivially_destructible` instead of
      `boost::has_trivial_destructor` in a few places.
    Pull Request resolved: #1003
    
    Reviewed By: lbrandy
    
    Differential Revision: D13754694
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: b32dbc901fd7c9cae681ac3436cc71ff075f30ec
    JoeLoser authored and facebook-github-bot committed Feb 12, 2019
    Configuration menu
    Copy the full SHA
    94860de View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2019

  1. Cut macro FOR_EACH_RANGE_R

    Summary: [Folly] Cut macro `FOR_EACH_RANGE_R`.
    
    Reviewed By: aary, danobi
    
    Differential Revision: D14058731
    
    fbshipit-source-id: d31c0673785d467665598e2138b6b6082d9629ab
    yfeldblum authored and facebook-github-bot committed Feb 13, 2019
    Configuration menu
    Copy the full SHA
    ff5f718 View commit details
    Browse the repository at this point in the history
  2. pretty_name

    Summary:
    [Folly] `pretty_name`, for getting static type pretty-names without RTTI.
    
    Available as constant expressions - no runtime overhead.
    
    Depends on per-platform non-specified magic symbols. May not work everywhere.
    
    Reviewed By: aary
    
    Differential Revision: D14019723
    
    fbshipit-source-id: e50557261024298cd37957b94dad3a10c927ee97
    yfeldblum authored and facebook-github-bot committed Feb 13, 2019
    Configuration menu
    Copy the full SHA
    86ec30e View commit details
    Browse the repository at this point in the history
  3. Remove disabled code from FOR_EACH_RANGE

    Summary: [Folly] Remove disabled code from `FOR_EACH_RANGE`.
    
    Reviewed By: aary
    
    Differential Revision: D14062987
    
    fbshipit-source-id: 6d01e76debc46398ceae3be435691c20595d393e
    yfeldblum authored and facebook-github-bot committed Feb 13, 2019
    Configuration menu
    Copy the full SHA
    f2c0cfd View commit details
    Browse the repository at this point in the history
  4. Include range in the folly python extensions (#1013)

    Summary:
    range.pxd needs to be exported; so that fbtrhift-py3 can compile against it
    Pull Request resolved: #1013
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13987018
    
    Pulled By: calebmarchent
    
    fbshipit-source-id: 7b7e6f62e5bc23e70a3c263fb3b33cf1d439e439
    Caleb Marchent authored and facebook-github-bot committed Feb 13, 2019
    Configuration menu
    Copy the full SHA
    9d8a3f7 View commit details
    Browse the repository at this point in the history
  5. Make sure doCallback() doesn't write into Executor if it's nullptr

    Summary: SemiFuture implementation assumes that it's always safe to read Executor (if Executor is DeferredExecutor - then SemiFuture can never be completed until via is called, otherwise Executor is nullptr and we should never overwrite it). doCallback() however was unconditionally overwritting Executor, which resulted in TSAN reports.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14063047
    
    fbshipit-source-id: 7553c8a2d0cbda05ad07b87297a334a69ee77f9c
    andriigrynenko authored and facebook-github-bot committed Feb 13, 2019
    Configuration menu
    Copy the full SHA
    97baa13 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2019

  1. Add futures::sleepUnsafe to allow migration to sleep returning a Semi…

    …Future
    
    Summary: Clone sleep as sleepUnsafe as a codemod target to migrate callsites to a SemiFuture-returning sleep.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14072020
    
    fbshipit-source-id: 3dc88378732ca203c168ea2e4371508ee376cc43
    LeeHowes authored and facebook-github-bot committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    f3eab11 View commit details
    Browse the repository at this point in the history
  2. A test verifying Function with max-align callables

    Summary: [Folly] A test verifying `Function` behaves as expected with max-align callables.
    
    Reviewed By: aary
    
    Differential Revision: D14077496
    
    fbshipit-source-id: 8a9efaee3cc4c5d69c6a94eb5ad1928d241eb4e0
    yfeldblum authored and facebook-github-bot committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    44e37ec View commit details
    Browse the repository at this point in the history
  3. Remove delayedUnsafe entirely

    Summary:
    delayedUnsafe was deprecated.
    
    All callers have been removed. This removes the core code so that it will not sneak back in.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14029673
    
    fbshipit-source-id: 0384364a8e0ab8953e9746b91e3b6e7b2e5d7c67
    LeeHowes authored and facebook-github-bot committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    7e209f4 View commit details
    Browse the repository at this point in the history
  4. Add functions for bridging semi futures

    Reviewed By: yfeldblum
    
    Differential Revision: D14062156
    
    fbshipit-source-id: 2cdc32fc9834bd165fa8011ca1d336edaf05f653
    Arushi Aggarwal authored and facebook-github-bot committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    cd6352d View commit details
    Browse the repository at this point in the history
  5. Remove priority from Core

    Summary: Wrap Executor in ExecutorWithPriority if custom priority is passed.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14079222
    
    fbshipit-source-id: 56917827f54115b90ca237c71321f7db327355e1
    andriigrynenko authored and facebook-github-bot committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    4c132ef View commit details
    Browse the repository at this point in the history
  6. fix compilation of ExceptionTracer on ARM

    Summary:
    On ARM gcc, the unwind header defines exception_class as a char[8] rather
    than a uint64_t.  Consequently compilation of exception_tracer fails on ARM
    with the following error:
    
        .../folly/experimental/exception_tracer/ExceptionTracer.cpp: In function 'bool folly::exception_tracer::{anonymous}::isAbiCppException(const __cxxabiv1::__cxa_exception*)':
        .../folly/experimental/exception_tracer/ExceptionTracer.cpp:107:45: error: invalid operands of types 'const char [8]' and 'unsigned int' to binary 'operator&'
            return (exc->unwindHeader.exception_class & 0xffffffff) == cppClass;
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
    
    Construct a uint64_t for this platform.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13763587
    
    fbshipit-source-id: 011cf13cdfcd1fffdeab8c384f7274f20faecbe5
    Robert Copeland authored and facebook-github-bot committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    934a40e View commit details
    Browse the repository at this point in the history
  7. Apply modernize-use-override (2nd iteration)

    Summary:
    Use C++11’s override and remove virtual where applicable.
    Change are automatically generated.
    
    Reviewed By: shixiao
    
    Differential Revision: D14089910
    
    fbshipit-source-id: 12c776ea06094ee77c7e07263397dab3419c5309
    Michael Liu authored and facebook-github-bot committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    a4c0fd9 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2019

  1. AsyncSocket.detachFd to AsyncSocket.detachNetworkSocket

    Reviewed By: yfeldblum
    
    Differential Revision: D13603520
    
    fbshipit-source-id: 08365b3723c024697a546223683e774f18b61a94
    Orvid authored and facebook-github-bot committed Feb 15, 2019
    Configuration menu
    Copy the full SHA
    1252eb2 View commit details
    Browse the repository at this point in the history
  2. Cut unneeded boost header from AtomicHashMap.h (#1018)

    Summary:
    - AtomicHashMap.h has an unneeded include for
      `<boost/type_traits/is_convertible.h`.
    - Remove the include and add `<type_traits>` in `AtomicHashMap-inl.h`
      since it uses `std::is_convertible`.
    Pull Request resolved: #1018
    
    Reviewed By: Orvid
    
    Differential Revision: D14078944
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: f1450166a5bedb279db71e9b4f915811c71e5f1a
    JoeLoser authored and facebook-github-bot committed Feb 15, 2019
    Configuration menu
    Copy the full SHA
    1b5288e View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2019

  1. Fix SemiFuture::within to support deferred work

    Reviewed By: yfeldblum
    
    Differential Revision: D14109224
    
    fbshipit-source-id: 4bcd40b8692478540f5b5b4ee2751f1d311b3ac5
    andriigrynenko authored and facebook-github-bot committed Feb 16, 2019
    Configuration menu
    Copy the full SHA
    08a5c35 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2019

  1. Use StaticSingletonManager for LoggerDB::get()

    Summary:
    [Folly] Use `StaticSingletonManager` for `LoggerDB::get()` inline fast path.
    
    This also simplifies the singleton setup overall.
    
    Note that the inline slow path here is not quite as small as doing the strategy directly would be since three pointers need to be passed to the outline slow path.
    
    Reviewed By: simpkins
    
    Differential Revision: D14016983
    
    fbshipit-source-id: ea2646f8efd5c2dbcdece4ebd3b88949bc3d4294
    yfeldblum authored and facebook-github-bot committed Feb 18, 2019
    Configuration menu
    Copy the full SHA
    a04d119 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2019

  1. Fix "use std::launder" predicate for Android NDKs

    Summary:
    The current predicate yields false positive for NDK r17. NDK r18 has launder without defining `__cpp_lib_launder`. NDK r19 finally gets it right by defining `__cpp_lib_launder`.
    
    r17: launder? no,  `__cpp_lib_launder` undefined, `_LIBCPP_VERSION == 6000`
    r18: launder? yes, `__cpp_lib_launder` undefined, `_LIBCPP_VERSION == 7000`
    r19: launder? yes, `__cpp_lib_launder == 201606L`, `_LIBCPP_VERSION == 8000`
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14098189
    
    fbshipit-source-id: 315dba44c6474407a8f4c1d25c81fff057d5f7db
    gkmhub authored and facebook-github-bot committed Feb 19, 2019
    Configuration menu
    Copy the full SHA
    60db6d7 View commit details
    Browse the repository at this point in the history
  2. kHasRtti

    Summary: [Folly] `kHasRtti` to parallel `FOLLY_HAS_RTTI`.
    
    Reviewed By: Orvid
    
    Differential Revision: D14129217
    
    fbshipit-source-id: ce60fd0b47c64c19b515d21db55aa88ba37ca637
    yfeldblum authored and facebook-github-bot committed Feb 19, 2019
    Configuration menu
    Copy the full SHA
    e11c6fe View commit details
    Browse the repository at this point in the history
  3. Adding DynamicConstructor specialization for enums

    Summary:
    A specialization for reading into enums from serialized form was added a while back. Unfortunately, no corresponding change to serialize from enums into a dynamic was added.
    
    This change adds the corresponding DynamicConstructor specialization for enums to allow serializing enums and objects containing enums.
    
    Reviewed By: ot, shixiao
    
    Differential Revision: D14091417
    
    fbshipit-source-id: 15ef8bc46843cd668b4b2c991e84167dabaf69fa
    paul-fb authored and facebook-github-bot committed Feb 19, 2019
    Configuration menu
    Copy the full SHA
    6e296e6 View commit details
    Browse the repository at this point in the history
  4. Cut backport of std::exchange (#1021)

    Summary:
    - Backporting `std:exchange` is no longer needed as Folly requires C++14
      support and C++14-compliant vendors have `std::exchange` in their
      standard library, notably including GCC 4.9.
    - Cut backport of `std::exchange` and fix call sites to explicitly use
      `std::exchange` where they were previously relying on `exchange` being
      found in the `folly` namespace.
    Pull Request resolved: #1021
    
    Reviewed By: Orvid
    
    Differential Revision: D14119875
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: 686a8e812f6728281b432eae1586de28d21da9dd
    JoeLoser authored and facebook-github-bot committed Feb 19, 2019
    Configuration menu
    Copy the full SHA
    e03e763 View commit details
    Browse the repository at this point in the history
  5. SSLContext: Disable TLSv1.3 support by default

    Summary:
    OpenSSL 1.1.1 adds TLSv1.3 support, but changes several semantics (e.g.
    assumptions on SSL_get_session() returning resumable sessions) that require
    some work to address. A lot of our AsyncSocket tests fail (e.g. tests for
    resumption will automatically fail, since TLSv1.3 has no resumption support),
    and would need to be updated to explicitly disable TLSv1.3.
    
    The plan is to eventually remove this after these items are addressed.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14073093
    
    fbshipit-source-id: 181b05395ed35aaa7deb00b8968ff4d371b683f4
    mingtaoy authored and facebook-github-bot committed Feb 19, 2019
    Configuration menu
    Copy the full SHA
    7fabe81 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2019

  1. folly/symbolizer: don't use ELF base address for executables

    Summary:
    I'm not entirely sure the original motivation for this, but for the current
    executable, we've been normalizing addresses from the virtual address referenced
    by the first "LOAD" program header instead of 0.  This appears to be a bug, as
    it forms invalid addresses into the ELF file.
    
    In the case of the signal handler test, this happens to work with gold, as the
    initial section lookup just happens to hit in the `.debug_str` section (as opposed
    to the expected `.text` section), and the following name translation then undoes
    the base address normalization to get a correct lookup.
    
    While this works for gold, it breaks for LLD and meant we had to opt-out folly
    out (D13279459).
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14119804
    
    fbshipit-source-id: 53dcaeb72ed75e58f9a46b15799ce1af5ff80531
    andrewjcg authored and facebook-github-bot committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    1feb410 View commit details
    Browse the repository at this point in the history
  2. Overload getKeepAliveToken

    Summary: getKeepAlive can get a KeepAlive object and return a copy of itself
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14095402
    
    fbshipit-source-id: 9d00ebecddc938e8cf02bcb7cee0642a666db349
    Michael Liu authored and facebook-github-bot committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    f28c81e View commit details
    Browse the repository at this point in the history
  3. Cut backport of std::index_sequence and friends (#1022)

    Summary:
    - Backporting `std::index_sequence`, `std::integer_sequence`, and other
      associated template aliases such as `index_sequence_for` and
      `make_index_sequence` is not needed as Folly requires C++14. These
      functions and template aliases are available in C++14 standard libraries,
      including GCC 4.9.
    Pull Request resolved: #1022
    
    Reviewed By: Orvid
    
    Differential Revision: D14119891
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: 5ba55cc91495cf488cebfa1ebe82c0ff919e9840
    JoeLoser authored and facebook-github-bot committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    08969df View commit details
    Browse the repository at this point in the history
  4. Remove code for custom OpenSSL 1.0.2 async

    Summary: Removes references to custom patches to OpenSSL 1.0.2 for async from AsyncSSLSocket.
    
    Reviewed By: anirudhvr
    
    Differential Revision: D13908917
    
    fbshipit-source-id: a01c1a8a7523dd7b4b95a7f701cc6b356c645332
    Alex Guzman authored and facebook-github-bot committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    02ddfa1 View commit details
    Browse the repository at this point in the history
  5. Cut unnecessary unreachable note in exceptionStr

    Summary: [Folly] Cut unnecessary `assume_unreachable` in `exceptionStr`.
    
    Reviewed By: meyering
    
    Differential Revision: D14129281
    
    fbshipit-source-id: a7ae13188bb19d829a6c977243719285186dbfec
    yfeldblum authored and facebook-github-bot committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    e90b9cb View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2019

  1. Use bit_cast in Endian

    Summary:
    [Folly] Use `bit_cast` in `Endian`.
    
    Requires moving `bit_cast` to the top of the header.
    
    Reviewed By: aary
    
    Differential Revision: D14080604
    
    fbshipit-source-id: cae28003895f1326138459c3a951d38e27e27506
    yfeldblum authored and facebook-github-bot committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    cc7dde6 View commit details
    Browse the repository at this point in the history
  2. Remove a legacy guard around an exceptionStr overload

    Summary: [Folly] Remove a legacy guard around an `exceptionStr` overload protecting against platforms lacking `std::exception_ptr`.
    
    Reviewed By: mzlee
    
    Differential Revision: D14129260
    
    fbshipit-source-id: 2947c5b00d901ccaf58aefeef51e442121777eba
    yfeldblum authored and facebook-github-bot committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    9715d54 View commit details
    Browse the repository at this point in the history
  3. Avoid unary negation of unsigned in FormatValue

    Summary:
    [Folly] Avoid unary negation of unsigned in `FormatValue`, which some compilers may warn against.
    
    ```
    folly\format-inl.h(452): error C4146: unary minus operator applied to unsigned type, result still unsigned
    ```
    
    Reviewed By: Orvid
    
    Differential Revision: D14141989
    
    fbshipit-source-id: 3bff06fe09fd4ec22d93b72a74f086ad9c576692
    yfeldblum authored and facebook-github-bot committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    dcc3106 View commit details
    Browse the repository at this point in the history
  4. only depend on libiberty on linux

    Summary: demangle.h isn't available on macOS, so only include it on Linux.
    
    Reviewed By: andrewjcg
    
    Differential Revision: D14114593
    
    fbshipit-source-id: 59b12bfb4a52ada636b3648115dec1383f58c22f
    chadaustin authored and facebook-github-bot committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    7a489dc View commit details
    Browse the repository at this point in the history
  5. Simplify is_negative

    Summary: [Folly] Simplify `is_negative`.
    
    Reviewed By: stevegury
    
    Differential Revision: D14141289
    
    fbshipit-source-id: 88bfd5923d90c5ac23d431110c0f2dc6c476d868
    yfeldblum authored and facebook-github-bot committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    12314eb View commit details
    Browse the repository at this point in the history
  6. type_info_of

    Summary: [Folly] `type_info_of`, which returns `typeid` when RTTI is available, otherwise `nullptr`.
    
    Reviewed By: swolchok
    
    Differential Revision: D14159675
    
    fbshipit-source-id: b64ab770f12c7385bb286f658627d085e561def6
    yfeldblum authored and facebook-github-bot committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    69e5467 View commit details
    Browse the repository at this point in the history
  7. Cut include needed from autotools build days (#1023)

    Summary:
    - When Folly supported autotools builds, a different include for
      `dwarf.h` was required in `folly/experimental/symbolizer/Dwarf.cpp`.
    - Since Folly does not support autotools  builds as of `1d58fd57`, cut
      this include and just assume `<dwarf.h>` works.
    Pull Request resolved: #1023
    
    Reviewed By: simpkins
    
    Differential Revision: D14119901
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: f676f72ec91e25390cb3bbbe544de7cbc68e1d73
    JoeLoser authored and facebook-github-bot committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    2ac8a36 View commit details
    Browse the repository at this point in the history
  8. Add option to set decay time to 0 for huge page allocator

    Summary:
    We observed some RSS regression for certain use cases - setting decay time to 0 should fix this as freed regions will be released back to the kernel immediately instead of delayed.
    
    The risk is that we lose regions before we can reallocate them and thus over time end up with holes in the huge page region.
    If we see this becoming an issue for some use cases, we can add a parameter to control the decay time.
    
    Releasing immediately should be OK for huge pages in most cases. For cases with frequent allocation and deallocation of large areas there can be a perf impact however.
    
    Reviewed By: interwq
    
    Differential Revision: D13853171
    
    fbshipit-source-id: 83fb95ed9c9bcb6ebdd1f80d78347e5eec61c084
    gdankel authored and facebook-github-bot committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    c673fbd View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2019

  1. Better constrain EvictingCacheMap iterator conversions

    Summary: [Folly] Better constrain `EvictingCacheMap` iterator conversions.
    
    Reviewed By: shixiao
    
    Differential Revision: D14162009
    
    fbshipit-source-id: 8a3011450620fcf1ee6a137834ebbd1e5953e0ed
    yfeldblum authored and facebook-github-bot committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    679a76a View commit details
    Browse the repository at this point in the history
  2. fix an UBSAN failure in DistributedMutex

    Summary:
    Fix an `invalid-shift-base` UndefinedBehaviorSanitizer failure.
    Previously all of the DistributedMutex-inl.h tests would fail with the
    following message on my system:
    
      runtime error: left shift of 94500093116194837 by 8 places cannot be
      represented in type 'long'
    
    It might be slightly nicer in the long run to change this code to use
    `std::chrono::duration<std::uint64_t, std::nano>` throughout rather than
    `std::chrono::nanoseconds`.  Currently the `time()` function casts the
    `uint64_t` value returned by `folly::hardware_timestamp()` into a signed
    value.
    
    Reviewed By: yfeldblum, aary
    
    Differential Revision: D14180336
    
    fbshipit-source-id: b199ae22d951162dc6f31d7f1c41a7d67cbcc935
    simpkins authored and facebook-github-bot committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    d3858da View commit details
    Browse the repository at this point in the history
  3. logging: add XCHECK_EQ and friends to XCHECK and XDCHECK

    Summary:
    Add XCHECK_EQ(), XCHECK_NE(), XCHECK_LT(), XCHECK_LE(), XCHECK_GT(), and
    XCHECK_GE(), plus corresponding XDCHECK_*() versions that only fail in debug
    buildk.
    
    These are similar to XCHECK()/XDCHECK(), but on failure they also log the
    values of the two expressions being compared.
    
    Reviewed By: therealgymmy
    
    Differential Revision: D14016494
    
    fbshipit-source-id: dba02d748f78d306227ec734d9e52ef0bc73919b
    simpkins authored and facebook-github-bot committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    f945396 View commit details
    Browse the repository at this point in the history
  4. FOLLY_TYPE_INFO_OF

    Summary: [Folly] `FOLLY_TYPE_INFO_OF` for cases where `folly::type_info_of` is insufficient.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D14181350
    
    fbshipit-source-id: 65d63424a5feaa6597eaddb670f760f0223717ae
    yfeldblum authored and facebook-github-bot committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    aa63328 View commit details
    Browse the repository at this point in the history
  5. Revert StaticMeta deleted dtor

    Summary: [Folly] Revert `StaticMeta` deleted dtor, which does not work well with standard constructibility tests like `std::is_constructible<StaticMeta<...>, ...>`.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D14181902
    
    fbshipit-source-id: de75fe2fc864c9a32a74b8058532ef49412ac838
    yfeldblum authored and facebook-github-bot committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    ab893da View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2019

  1. Fix rangeAdjust to handle cases of non-overlapping time ranges

    Summary:
    When adjusting nextBucketStart by rounding down, we should also check if
    that causes it to not overlap with the user-specified [start, end) time
    interval. If it does not overlap, then return an empty return type since
    this bucket does not contribute anything to the specified time-range.
    
    Reviewed By: simpkins
    
    Differential Revision: D14121401
    
    fbshipit-source-id: bbfb1d6a71c9fb99244cdff887a7a9ee18741f25
    mnv104 authored and facebook-github-bot committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    ed7dbad View commit details
    Browse the repository at this point in the history
  2. Cut outdated comment in FOR_EACH_RANGE

    Summary:
    [Folly] Cut outdated comment in `FOR_EACH_RANGE` implementation details.
    
    It refers to a shortcoming in a specific version of boost which is no longer supported in folly.
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: Orvid
    
    Differential Revision: D14197473
    
    fbshipit-source-id: 3379af1cc69ab96fcb77be0a56ea7a5762ff7db5
    yfeldblum authored and facebook-github-bot committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    f3729dd View commit details
    Browse the repository at this point in the history
  3. Shrink StaticSingletonManager inline slow path

    Summary: [Folly] Shrink `StaticSingletonManager` inline slow path by passing only one argument to the outline slow path, rather than passing three arguments. In optimized builds, the argument is an immediate loaded into a register.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D14121341
    
    fbshipit-source-id: f715225d0dc94df9bf2bef440ffeb08bb7a88fba
    yfeldblum authored and facebook-github-bot committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    29ec891 View commit details
    Browse the repository at this point in the history
  4. Remove the fd overloads of AsyncSocket get & detach fd

    Summary: They are dead.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14191874
    
    fbshipit-source-id: 80e6b9c51aa7d29ccc01148ccb1fd1014688c764
    Orvid authored and facebook-github-bot committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    88c2fec View commit details
    Browse the repository at this point in the history
  5. Shift from the file descriptor overload of EventHandler to the Networ…

    …kSocket overload
    
    Summary: The file descriptor overload will be going away.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14070240
    
    fbshipit-source-id: 20a0248fd9840629e31a3274032b889b6bb5f8de
    Orvid authored and facebook-github-bot committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    add0a12 View commit details
    Browse the repository at this point in the history
  6. Add a safety net to NetworkSocket::fromFd

    Summary: The codemod tooling has demonstrated issues distinguishing between integer and bool overloads, so add a safety net just in case.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13995489
    
    fbshipit-source-id: 2a853f8c961953d4cdd24256420ecc29cb13c677
    Orvid authored and facebook-github-bot committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    51a97c3 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2019

  1. Fix namespace in folly::copy comments

    Summary: Fix namespace in folly::copy comments
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14202488
    
    fbshipit-source-id: 14ebc5a58bfd3b62e4d6ecd03e1ceffa796f4b1f
    aary authored and facebook-github-bot committed Feb 24, 2019
    Configuration menu
    Copy the full SHA
    8fc7607 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2019

  1. Remove the fd overload of AsyncServerSocket::useExistingSockets

    Summary: Remove all uses and remove the overload.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14194039
    
    fbshipit-source-id: c3b271747200b9219b734e5a0f19c6d5d4d135a2
    Orvid authored and facebook-github-bot committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    b66dfac View commit details
    Browse the repository at this point in the history
  2. Add to_underlying_type to cast enum to underlying (#1028)

    Summary:
    - It is verbose at the call sites to cast an enum or enum class to its
      underlying type.
    - Introduce `to_underlying_type`, which, given an enum or enum class,
      returns the value from static casting to the underlying type.
    Pull Request resolved: #1028
    
    Reviewed By: stevegury
    
    Differential Revision: D14199619
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: fde85b9be50945a390b18ba1448a0137f3d7b63e
    JoeLoser authored and facebook-github-bot committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    83b597e View commit details
    Browse the repository at this point in the history
  3. Omit excess landing pads with StaticSingletonManager

    Summary:
    [Folly] Omit excess landing pads with `StaticSingletonManager` when the type of the global is nothrow-default-constructible.
    
    This changes behavior for nothrow-default-constructible types to terminate immediately if the process is out of memory while performing the bookkeeping around attempting to instantiate a global.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D14203826
    
    fbshipit-source-id: 8c9becde3b245d6b027c97bd8541c48745727dff
    yfeldblum authored and facebook-github-bot committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    c17964f View commit details
    Browse the repository at this point in the history
  4. Make TimekeeperTest use thenError

    Summary: Update to use thenError rather than onError.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14209634
    
    fbshipit-source-id: 5cbb66146b148654641a7a0a58717a31608a4ac7
    LeeHowes authored and facebook-github-bot committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    d389009 View commit details
    Browse the repository at this point in the history
  5. Use pretty_name in F14TableStats

    Summary: [Folly] Use `pretty_name` in `F14TableStats`, which may not be exact in edge cases (e.g. function-local policy types) but which works without RTTI.
    
    Reviewed By: nbronson
    
    Differential Revision: D14129242
    
    fbshipit-source-id: 6f7a8e0b3af4d6b16673770228e98cd989ab0c3f
    yfeldblum authored and facebook-github-bot committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    02e5618 View commit details
    Browse the repository at this point in the history
  6. Cut FOLLY_USE_CPP14_CONSTEXPR and FOLLY_CPP14_CONSTEXPR (#1029)

    Summary:
    - `FOLLY_USE_CPP14_CONSTEXPR` macro is not needed as Folly requires a
      recent enough version of MSVC where its constexpr support is "good
      enough". For Clang and GCC, the min compiler versions supported would
      both evaluate the prior implementation of this macro to true in both
      cases. This is potentially slightly behavior changing since
      `FOLLY_USE_CPP14_CONSTEXPR` would be `inline` for ICC and I am not
      sure if its constexpr support is "good enough" for a min version of
      ICC we claim support for.
    - Replace `FOLLY_CPP14_CONSTEXPR` with `constexpr` in all call sites and
      remove the `FOLLY_CPP14_CONSTEXPR` macro.
    - Simplify how we define `FOLLY_STORAGE_CONSTEXPR` and
      `FOLLY_STORAGE_CPP14_CONSTEXPR` after cutting
      `FOLLY_USE_CPP14_CONSTEXPR`.
    Pull Request resolved: #1029
    
    Reviewed By: Orvid
    
    Differential Revision: D14199538
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: 99daecf7d7ad0c4bf6735e74247112a78923602a
    JoeLoser authored and facebook-github-bot committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    cd3b981 View commit details
    Browse the repository at this point in the history
  7. Add std::string_view specialization in F14Table.h (#1031)

    Summary:
    - `F14Table.h`'s fallback when SIMD isn't used has template specializations
      to track which `std::hash` implementations are considered worth caching by
      `std::unordered_map`. This included `std::string` but was missing
      support for `std::string_view`. This commit adds support for marking
     `std::string_view` as not fast.
    Pull Request resolved: #1031
    
    Reviewed By: nbronson
    
    Differential Revision: D14197661
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: bd634b5755e2794891200c7f71e9d6874a60cc38
    JoeLoser authored and facebook-github-bot committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    223aae6 View commit details
    Browse the repository at this point in the history
  8. Fix unnecessary copy warnings found by Infer

    Summary:
    Infer AL has reported valid warnings on some folly and thrift code:
    
    ```
    fbcode/folly/io/async/AsyncUDPServerSocket.h:228:19:
    WARNING Extra Copy: Potentially unnecessary to copy var `client` at line 228, column 19. Use 'const auto&' or 'auto&' if possible.
    fbcode/folly/io/async/AsyncUDPServerSocket.h:230:19:
    WARNING Extra Copy: Potentially unnecessary to copy var `socket` at line 230, column 19. Use 'const auto&' or 'auto&' if possible.
    fbcode/thrift/lib/cpp/TProcessorEventHandler.h:148:15:
    WARNING Extra Copy: Potentially unnecessary to copy var `ew` at line 148, column 15. Use 'const auto&' or 'auto&' if possible.
    fbcode/thrift/lib/cpp2/server/ThriftServer.h:705:20:
    WARNING Extra Copy: Potentially unnecessary to copy var `sockets` at line 705, column 20. Use 'const auto&' or 'auto&' if possible.
    ```
    
    As these are transitively included in many services, they are fairly prevalent/annoying warnings. Let's fix them.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14168260
    
    fbshipit-source-id: 12e537fe5aa73e653c15c4fef01ac618e51cd4d0
    mberenbach authored and facebook-github-bot committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    986a612 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2019

  1. Address MSVC C4686 in folly/lang/Pretty.h

    Summary:
    [Folly] Address MSVC C4686 in `folly/lang/Pretty.h`.
    
    Resolves:
    
    ```
    folly\lang\pretty.h(119): warning C4686: 'folly::detail::pretty_name_zarray<T>::zarray_': possible change in behavior, change in UDT return calling convention
    ```
    
    Reviewed By: Orvid
    
    Differential Revision: D14214290
    
    fbshipit-source-id: c5e0ebd7c100413737bdcba157ec8b5ce42895de
    yfeldblum authored and facebook-github-bot committed Feb 26, 2019
    Configuration menu
    Copy the full SHA
    6f14ffa View commit details
    Browse the repository at this point in the history
  2. Remove disabling -Warray-bounds for GCC in FBString.h (#999)

    Summary:
    - Existing code disables `-Warray-bounds` warning for GCC due to a bug in
      GCC 4.9.
    - As seen in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124, the bug
      has been resolved for GCC 5.1.
    - Since the bug has been resolved, we no longer need to disable the
      warning.
    
    yfeldblum I suspect that we have to hold off on this PR until the internal use cases relying on GCC 4.9 upgrade, but I figured it is better to have some of these cleanup opportunities ready for when the time arises.
    Pull Request resolved: #999
    
    Reviewed By: ot, Orvid
    
    Differential Revision: D13729723
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: da33704c2e2022c2dad0681e4d6152105a1cf54d
    JoeLoser authored and facebook-github-bot committed Feb 26, 2019
    Configuration menu
    Copy the full SHA
    268ab2a View commit details
    Browse the repository at this point in the history
  3. Change return type of futures::sleep to SemiFuture

    Summary:
    futures::sleep returning a Future leads to continuations easily being run on
    the Timekeeper's callback. The goal is to change the return type so that
    futures::sleep returns a folly::SemiFuture.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14069549
    
    fbshipit-source-id: b98e2c76ccbf0a80aed28f90a1f3c63f15eb2e5c
    LeeHowes authored and facebook-github-bot committed Feb 26, 2019
    Configuration menu
    Copy the full SHA
    75d2025 View commit details
    Browse the repository at this point in the history
  4. Surround code snippets with tildes (#1032)

    Summary:
    Angled brackets inside angled brackets is not displayed.
    This makes the document misleading.
    Pull Request resolved: #1032
    
    Reviewed By: shixiao
    
    Differential Revision: D14207772
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: 4f2e58145a5473a7b887ef1da4efbeb16d5330c6
    Ning Xu authored and facebook-github-bot committed Feb 26, 2019
    Configuration menu
    Copy the full SHA
    017cd27 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2019

  1. Fix a race when a leaf update is missed

    Summary:
    If multiple leaves are updated at the same time (or a new observer is created concurrently that depends on the updated leaf) it's possible for refresh to be called concurrently with force=false which will not update the leaf value, but also ignore the refresh with force=true.
    This is fixed by making force to be the property of the leaf observer itself, which is set when the version is bumped.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14222400
    
    fbshipit-source-id: 657c2c273002f576dbe48a232eaef2d530cea07d
    andriigrynenko authored and facebook-github-bot committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    bde0b49 View commit details
    Browse the repository at this point in the history
  2. Cut deducible template arg in DefaultKeepAliveExecutor init

    Summary: [Folly] Cut deducible template arg in `DefaultKeepAliveExecutor` init - let it be deduced instead.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D14236171
    
    fbshipit-source-id: 2de043efe541c13c59764715516b08d77efcb99b
    yfeldblum authored and facebook-github-bot committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    c2a6186 View commit details
    Browse the repository at this point in the history
  3. DefaultKeepAliveExecutor::reset

    Summary: [Folly] `DefaultKeepAliveExecutor::reset` in case of restartable executors.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D14236173
    
    fbshipit-source-id: 14f71af6bd54777770fdfe6036a4137af4e884bc
    yfeldblum authored and facebook-github-bot committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    c971b9f View commit details
    Browse the repository at this point in the history
  4. Cut disabling uninitialized warnings in folly/experimental/Bits.h (#1033

    )
    
    Summary:
    - `folly/experimental/Bits.h` has a section where we disable two
      uninitialized-flavors of warnings that were needed for GCC 4.8
    - Since we do not support GCC 4.8 anymore and GCC 5.1 does not have
      issues with this, do not disable the warnings anymore.
    Pull Request resolved: #1033
    
    Reviewed By: Orvid
    
    Differential Revision: D14223285
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: 0088341b13e26dff2dc90a768319cccc45e942da
    JoeLoser authored and facebook-github-bot committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    a79183e View commit details
    Browse the repository at this point in the history
  5. Move decay_rvalue_reference_t metafunction to folly/experimental/coro…

    …/detail/Traits.h
    
    Summary:
    Make this metafunction available for use outside of the
    folly::coro::blockingWait() implementation.
    
    I plan to reuse this metafunction for other operators such as `when_all()`.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13778687
    
    fbshipit-source-id: f766f93da21bf19e89262cd60048b0b7b1b76940
    Lewis Baker authored and facebook-github-bot committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    3a12942 View commit details
    Browse the repository at this point in the history
  6. Add a NetworkSocket overload for AsyncUDPServerSocket->getFD

    Summary: I missed one of the functions that needs a NetworkSocket overload in past iterations.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14237211
    
    fbshipit-source-id: 6d0bd151ff636206a44940c88a2d48c339aa67de
    Orvid authored and facebook-github-bot committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    670768f View commit details
    Browse the repository at this point in the history
  7. Simplify observable state

    Summary: Merge two mutexes together and get rid of atomics.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14236244
    
    fbshipit-source-id: 0b97d519e72322377e225a0cc8975e3a2a86ec31
    andriigrynenko authored and facebook-github-bot committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    f3a0061 View commit details
    Browse the repository at this point in the history
  8. Remove AsyncServerSocket.getSockets()

    Summary: It is dead
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14235873
    
    fbshipit-source-id: bafc323898f2a17aedf6644f9c2dd7319b8e6420
    Orvid authored and facebook-github-bot committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    01354e2 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2019

  1. Allow trivially move constructible types to be relocatable (#1035)

    Summary:
    - If a type is not marked explicitly with `IsRelocatable`
      as `std::true_type`, we infer its relocability only based on the
      property of whether the type is trivially copyable.
    - Extend the default relocability to also be true for trivially move
      constructible types.
    Pull Request resolved: #1035
    
    Reviewed By: Orvid
    
    Differential Revision: D14240127
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: 1e15d312d1a8340417bba2beb1db30ce4c543b26
    JoeLoser authored and facebook-github-bot committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    bb19b30 View commit details
    Browse the repository at this point in the history
  2. fix folly:memory build on macOS

    Summary:
    Don't assume a jemalloc target exists (even if it would be a no-op, as
    in on macOS). Instead compute the correct set of external_deps in
    jemalloc.bzl.
    
    This fixes the folly build on mode/mac after D14179337.
    
    Reviewed By: andrewjcg
    
    Differential Revision: D14235815
    
    fbshipit-source-id: d1bfbb91897de9557524bbb4b5736ca7b03cbf9b
    chadaustin authored and facebook-github-bot committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    a255f1f View commit details
    Browse the repository at this point in the history
  3. InlineFunctionRef for inline FunctionRef storage

    Summary:
    InlineFunctionRef is a semantically the same as folly::FunctionRef but has the
    additional benefit of being able to store the function it was instantiated
    with inline in a buffer of the given capacity.  If there is not enough in-situ
    capacity for the callable, this has the same semantics as FunctionRef.
    
    This helps give a perf boost in the case where the data gets separated from
    the point of invocation.  If, for example, at the point of invocation, the
    InlineFunctionRef object is not cached, a remote memory/cache read might be
    required to invoke the original callable.  Customizable inline storage helps
    tune storage so we can store a type-erased callable with better performance
    and locality.  A real-life example of this might be a folly::FunctionRef with
    a function pointer.  The folly::FunctionRef would point to the function
    pointer object in a remote location.  This causes a double-indirection at the
    point of invocation, and if that memory is dirty, or not cached, it would
    cause additional cache misses.  On the other hand with InlineFunctionRef,
    inline storage would store the value of the function pointer, avoiding the
    need to do a remote lookup to fetch the value of the function pointer.
    
    To prevent misuse, InlineFunctionRef disallows construction from an lvalue
    callable.  This is to prevent usage where a user relies on the callable's
    state after invocation through InlineFunctionRef.  This has the potential to
    copy the callable into inline storage when the callable is small, so we might
    not use the same function when invoking, but rather a copy of it.
    
    Also note that InlineFunctionRef will always invoke the const qualified
    version of the call operator for any callable that is passed.  Regardless of
    whether it has a non-const version.  This is done to enforce the logical
    constraint of function state being immutable.
    
    This class is always trivially-copyable (and therefore
    trivially-destructible), making it suitable for use in a union without
    requiring manual destruction.
    
    Reviewed By: yfeldblum, ot
    
    Differential Revision: D14029799
    
    fbshipit-source-id: 2cff3ce27d564f3d524095189f847c14911f9402
    aary authored and facebook-github-bot committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    a703ff2 View commit details
    Browse the repository at this point in the history
  4. Deprecate futures::sleepUnsafe

    Summary: Deprecate sleepUnsafe to avoid use growing and to clearly communicate the change.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14255404
    
    fbshipit-source-id: cb2116910a15b9835fef9bf4273242457a5e96bd
    LeeHowes authored and facebook-github-bot committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    ad001a2 View commit details
    Browse the repository at this point in the history
  5. Shift calls of the file descriptor overload of AsyncSocket::AsyncSock…

    …et() to the NetworkSocket overload
    
    Summary: The file descriptor overload will be going away.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D13998628
    
    fbshipit-source-id: 7a1d3bae03d4742d874e1e7d733f7733b5a1c110
    Orvid authored and facebook-github-bot committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    3938ebc View commit details
    Browse the repository at this point in the history
  6. Remove the fd overload of AsyncSocket::newSocket

    Summary: It's dead.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14192000
    
    fbshipit-source-id: 3cecbc8e9f656080a023d676883de9943e7d0004
    Orvid authored and facebook-github-bot committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    cee1964 View commit details
    Browse the repository at this point in the history
  7. Back out "[folly][PR] Allow trivially move constructible types to be …

    …relocatable"
    
    Summary: Original commit changeset: 1e15d312d1a8
    
    Reviewed By: Orvid
    
    Differential Revision: D14265880
    
    fbshipit-source-id: 8c2ad3e15334015dadc19bf77b061f66086adcd6
    mengz0 authored and facebook-github-bot committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    3f7a734 View commit details
    Browse the repository at this point in the history
  8. Quick fix for OpenSSL 1.1.0 on Windows

    Summary:
    This was treating a socket as a file descriptor, so make it explicitly be a file descriptor instead.
    The full fix for this requires a *lot* of refactoring and splitting of a lot of concepts within Folly, so this short-term fix should be good enough for now.
    
    Reviewed By: boguscoder
    
    Differential Revision: D14266198
    
    fbshipit-source-id: bafb3a403ab8555f865f4541323c5d0ad81f5052
    Orvid authored and facebook-github-bot committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    95478cc View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2019

  1. Implemented the Blake2xb XOF (extendable output function)

    Summary: Implemented the Blake2xb XOF. See the specification at https://blake2.net/blake2x.pdf.
    
    Reviewed By: djwatson
    
    Differential Revision: D13403920
    
    fbshipit-source-id: 38afd6d3b782c2f6649365d01ca3d83b55c90c4b
    ivmaykov authored and facebook-github-bot committed Mar 1, 2019
    Configuration menu
    Copy the full SHA
    6880b41 View commit details
    Browse the repository at this point in the history
  2. make blake2xb compatible w/ libsodium 1.0.17+

    Summary: struct crypto_generichash_blake2b_state was made opaque in libsodium 1.0.17. This change is needed to make blake2xb code compile.
    
    Reviewed By: djwatson
    
    Differential Revision: D14141454
    
    fbshipit-source-id: eee887e8300229ff568d12ef19b46472edfc56d2
    ivmaykov authored and facebook-github-bot committed Mar 1, 2019
    Configuration menu
    Copy the full SHA
    f42dd78 View commit details
    Browse the repository at this point in the history
  3. Implemented LtHash in folly/experimental/crypto

    Summary:
    Added LtHash, a cryptographic homomorphic hash, to folly/experimental/crypto.
    This has a soft dependency on libsodium and the code will not be compiled if libsodium is not detected by cmake.
    
    Reviewed By: djwatson
    
    Differential Revision: D13390825
    
    fbshipit-source-id: f7597ced7bcc7b403e8bbaa733837b795128f1b3
    ivmaykov authored and facebook-github-bot committed Mar 1, 2019
    Configuration menu
    Copy the full SHA
    a0e3a74 View commit details
    Browse the repository at this point in the history
  4. Avoid explicit memset in IPAddress storage union

    Summary: [Folly] Avoid explicit `memset` in `IPAddress` storage union by having an explicit storage field and value-initializing it in the default constructor.
    
    Reviewed By: stevegury
    
    Differential Revision: D14270246
    
    fbshipit-source-id: f1f135f20709d8225e984ee3d6b397d4b04e0d76
    yfeldblum authored and facebook-github-bot committed Mar 1, 2019
    Configuration menu
    Copy the full SHA
    61c3151 View commit details
    Browse the repository at this point in the history
  5. Inline TypeError special member functions (#1034)

    Summary:
    The `TypeError` special member functions - copy and move constructors and assignment operators - were outlined to reduce inline code size of `throw TypeError(...);` statements. This is no longer necessary, since these sites have been replaced by `folly::throw_exception<TypeError>(...);` statements, which have minimal inline code size. As a benefit, the special member functions may all now be declared as defaulted within the class body, and the conditional `noexcept` calculations are no longer required to be written - the compiler will do them. (Note: as of the libstdc++ which ships with GCC 5, library exception special member functions are `noexcept`; previously, they are not.)
    
    Pull Request resolved: #1034
    
    Reviewed By: nbronson
    
    Differential Revision: D14255166
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: 2f795a2b937fee58f243a9d374fc01829c674fe6
    JoeLoser authored and facebook-github-bot committed Mar 1, 2019
    Configuration menu
    Copy the full SHA
    baeb381 View commit details
    Browse the repository at this point in the history
  6. Make EventBase enqueue noexcept

    Summary:
    [Folly] Make `EventBase` enqueue `noexcept`.
    
    It cannot really fail anyway in correct usage besides allocation failure, unless in the `EventBase` destructor and while draining and the `AlwaysEnqueue` variant is called.
    
    Theoretically if a caller attempts to enqueue concurrently with `EventBase` dtor while in `consumeUntilDrained`, but either *not* in the `EventBase` thread or in the `EventBase` thread and using the `AlwaysEnqueue` variant, there is a race which can lead to termination.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D14114678
    
    fbshipit-source-id: 9a0128d207f86ca34eb8a1d417766c095ed5e137
    yfeldblum authored and facebook-github-bot committed Mar 1, 2019
    Configuration menu
    Copy the full SHA
    8dc220b View commit details
    Browse the repository at this point in the history
  7. fix comments in experimental/crypto/Blake2xb.h

    Summary: The reinit() method was removed but some comments mentioning it remained. Remove them.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D14277614
    
    fbshipit-source-id: 389ef3e2afe1fdc60f37aaec2f8a48dfa0b1436c
    ivmaykov authored and facebook-github-bot committed Mar 1, 2019
    Configuration menu
    Copy the full SHA
    20a8a09 View commit details
    Browse the repository at this point in the history
  8. Remove include of glog from Range.h

    Summary: [Folly] Remove include of `glog` from `Range.h`.
    
    Reviewed By: lbrandy, Orvid
    
    Differential Revision: D14114164
    
    fbshipit-source-id: e227609e9214ab39ff272e44519d34f3047fe025
    yfeldblum authored and facebook-github-bot committed Mar 1, 2019
    Configuration menu
    Copy the full SHA
    1c841a3 View commit details
    Browse the repository at this point in the history
  9. Revert D14114164: [Folly] Remove include of glog from Range.h

    Differential Revision:
    D14114164
    
    Original commit changeset: e227609e9214
    
    fbshipit-source-id: 99d0fde58e512224915d7a00893ddf15c547dfba
    rratmansky authored and facebook-github-bot committed Mar 1, 2019
    Configuration menu
    Copy the full SHA
    a99a9d3 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2019

  1. Support C++11 in folly/IPAddress.h w.r.t. aligned_union

    Summary: [Folly] Support C++11 in `folly/IPAddress.h` w.r.t. `aligned_union` by avoiding `aligned_union_t`, which is C++14.
    
    Reviewed By: spalamarchuk, mengz0
    
    Differential Revision: D14278604
    
    fbshipit-source-id: 474ac0aa0110f4939d1042d334b69feb6b2644cb
    yfeldblum authored and facebook-github-bot committed Mar 2, 2019
    Configuration menu
    Copy the full SHA
    40df948 View commit details
    Browse the repository at this point in the history
  2. Mark BitIterator with the category of the base

    Summary:
    [Folly] Mark `BitIterator<BaseIterator>` with the iterator category of `BitIterator`.
    
    As one benefit, using `std::distance` to find the distance between two `BitIterator`s gotten from a random access container such as `std::vector` is now constant-time.
    
    Fixes #1026.
    
    Reviewed By: ot
    
    Differential Revision: D14294852
    
    fbshipit-source-id: 2345bc73dec169803ae41b9391687e89ad77207b
    yfeldblum authored and facebook-github-bot committed Mar 2, 2019
    Configuration menu
    Copy the full SHA
    973c5bb View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2019

  1. Fix property_set_insert_t metafunction in pushmi

    Summary: The property_set_insert_t<PS1, PS2> template metafunction had a bug that meant that it would fail to replace elements in the base set that had the same category as elements from the set being inserted.
    
    Reviewed By: ericniebler, kirkshoop
    
    Differential Revision: D14268145
    
    fbshipit-source-id: ccc64e455bc6ff2073229e028a19d64dc7050092
    Lewis Baker authored and facebook-github-bot committed Mar 4, 2019
    Configuration menu
    Copy the full SHA
    8d53d77 View commit details
    Browse the repository at this point in the history
  2. Fix to handle empty CMAKE_SYSTEM_ARCHITECTURE (#1040)

    Summary:
    - On some platforms, `CMAKE_SYSTEM_ARCHITECTURE` may resolve to an empty
      string.
    - When this value is used without quotes to the `string` command, it is
      ill-formed with error:
    
    ```
      CMake Error at CMakeLists.txt:174 (string):
      string sub-command FIND requires 3 or 4 parameters.
    ```
    
    - Explicitly wrap the value to the `string` operation in quotes to treat
      `CMAKE_SYSTEM_ARCHITECTURE` as a string, which is allowed to be empty.
      The result is that the `string` operation will not result in a hard
      error.
    Pull Request resolved: #1040
    
    Reviewed By: calebmarchent
    
    Differential Revision: D14293784
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: cd5924fa62277aa07e930c7b088197ef596be977
    JoeLoser authored and facebook-github-bot committed Mar 4, 2019
    Configuration menu
    Copy the full SHA
    1cb1ad7 View commit details
    Browse the repository at this point in the history