- 18 Jun, 2020 1 commit
-
-
Michael Park authored
Summary: This macro has been deprecated and given that there are not that many uses, it seems relatively simple to remove it entirely. Reviewed By: yfeldblum, aary Differential Revision: D16904736 fbshipit-source-id: 56daffd480c586be2a5636b3ce20c6fe1d5ea018
-
- 17 Jun, 2020 8 commits
-
-
Andrii Grynenko authored
Reviewed By: yfeldblum Differential Revision: D22071829 fbshipit-source-id: c7f0e1bc5a4257731bafee09144c33c9fb474e10
-
Doug Rabson authored
Summary: The ValueType alias in the multiplex function is not used and caused a build failure when I tried to use it, possibly because we have some extra warnings enabled in our code. Reviewed By: lewissbaker Differential Revision: D21685780 fbshipit-source-id: 3235c6444a623d5f484f0849679b1497f9456fa9
-
Lukas Piatkowski authored
cargo_from_buck: add the patch section to Cargo workspace and allow workspace appending to existing manifest Summary: Two changes here: 1. The `[patch.crates-io]` section of `third-party/rust/Cargo.toml` is being now copied over to workspaces generated by autocargo for OSS and in the runtime generated Cargo.toml file for cargo-fbcode builds. Without that some projects could be buildable in Buck internally, but not externally on GitHub due to missing patches. 2. If a `[workspace]` Cargo.toml file is being generated and there is already a generated Cargo.toml file in the same directory then instead of overriding that file the `[workspace]` (and `[patch]`) sections are appended to that Cargo.toml file. Reviewed By: farnz Differential Revision: D22023144 fbshipit-source-id: dec54491c36c2ee0ab29eefb722b3eceaef6ffe1
-
Mark Santaniello authored
Summary: Adjust `CxxAllocatorAdaptor` such that it becomes default constructible. This makes `SysArenaAllocator` default constructible too, which makes it much easier to use. A default-constructed `SysArenaAllocator` is not useful at all. Any attempt to allocate just throws `std::bad_alloc`. But it makes it possible to at least compile code like this: ``` using MyAlloc = SysArenaAllocator<char>; struct Foo { Foo() = default; // BOOM Foo(MyAlloc &a) : v(a) {}; vector<int, MyAlloc> v; } ``` Reviewed By: yfeldblum Differential Revision: D21967640 fbshipit-source-id: 5b74c6db14d75364b374cad71d0069b17769e5d6
-
Sumeet Khullar authored
Differential Revision: D22027490 Original commit changeset: 964d9fa19ca9 fbshipit-source-id: 2c92ea47c64450cb031be4a6df3c3be4901500b7
-
Lewis Baker authored
Summary: On Linux platforms the folly::futexWait() functions are implemented using the futex() syscall, which requires passing a timeout parameter that specifies a an expiry time either in CLOCK_REALTIME or CLOCK_MONOTONIC. The futexWait() implementation currently assumes that the std::chrono::system_clock and std::chrono::steady_clock implementations are thin wrappers over these clock types and that we can directly convert the .time_since_epoch() values to a timespec value that we can pass to the futex() syscall. The Futex.clock_source test is checking this assumption about the implementation of the std::chrono clocks. Unfortunately, this assumption does not hold on recent libc++ implementations for Apple platforms, which now uses the CLOCK_UPTIME_RAW clock for the std::chrono::steady_clock implementation and so this test was failing on the Mac platforms. However, since we aren't actually relying on this assumption on platforms other than Linux, we can just disable this test for non-Linux platforms. Reviewed By: yfeldblum Differential Revision: D22075639 fbshipit-source-id: 229995ba7c01b52d1949ef5942774920876d0994
-
Andrii Grynenko authored
Summary: Thread fences are not supported by TSAN Reviewed By: yfeldblum Differential Revision: D22056483 fbshipit-source-id: dfe5b462656605f2e659302125e248b287037629
-
Matt Ma authored
Summary: Original commit changeset: 25d4049019e4 Base diff broke fboss build (using fbcode_builder) with the following error: /tmp/fbcode_builder_getdeps-ZrootZfboss2.gitZbuildZfbcode_builder-root/installed/folly/include/folly/init/Init.h:22:10: fatal error: folly/experimental/symbolizer/SymbolizerMode.h: No such file or directory #include <folly/experimental/symbolizer/SymbolizerMode.h> Revert this first to unblock fboss while I am investigating the failure. Reviewed By: shri-khare Differential Revision: D22077183 fbshipit-source-id: 8bafc0518df82c61922104b7d59ef5ee20fdd572
-
- 16 Jun, 2020 2 commits
-
-
Pranav Thulasiram Bhat authored
Summary: Move the tests for the async framework into the a test directory under folly/fibers/async/ Differential Revision: D22023986 fbshipit-source-id: c38aa2a63381c2aea1fd89a0cf2740ca028152c9
-
Yedidya Feldblum authored
Summary: [Folly] Add missing `#include <memory>` in `folly/memory/ReentrantAllocator.h`. Closes: https://github.com/facebook/folly/pull/1379. Reviewed By: Orvid Differential Revision: D22062251 fbshipit-source-id: 30e2f5aa2708048c478a298cf7e12a012ba59540
-
- 15 Jun, 2020 8 commits
-
-
Matt Ma authored
Summary: Fixed the missed initialization in InitOptions. Reviewed By: luciang Differential Revision: D22023637 fbshipit-source-id: 25d4049019e42708c98e5b589ed4838e2870d39b
-
Giuseppe Ottaviano authored
Summary: F14 class member fields are often in headers, and often the default constructor is implicit. The current implementation unconditionally instantiates `reserve()`, which has non-negligible cost. By specializing the default constructor we can avoid that in the common case. Reviewed By: philippv, luciang Differential Revision: D22027490 fbshipit-source-id: 964d9fa19ca92797bcb209e09959dc4706af39d4
-
Pranav Thulasiram Bhat authored
Summary: This diff implements a deduction guide for explicitly creating and returning Async objects in lambdas and functions with deduced return types. This saves the user from having to specify often lengthy return types when annotating such functions. Reviewed By: A5he Differential Revision: D21770141 fbshipit-source-id: f80898ef6eeadee7c5a7168aaae4031e224a0935
-
Pranav Thulasiram Bhat authored
Summary: This diff implements traits to aid in the development of templated functions accepting annotated functions. Reviewed By: yfeldblum, A5he Differential Revision: D21770066 fbshipit-source-id: 40ae340aeeb484c4f9769c13b5c9a92a97723801
-
Pranav Thulasiram Bhat authored
Summary: This diff implements `coro_wait`, an annotated helper to block on the execution of a coroutine. The goal here is to provide an easy way to migrate from fibers to coroutines. Reviewed By: A5he Differential Revision: D21978610 fbshipit-source-id: d59a222978d9db2963656312e71c7dcb2b9a11e9
-
Pranav Thulasiram Bhat authored
Summary: This diff adds `future_wait`, an annotated helper to run blocking `get` operations on futures. `future_wait` will help annotate functions (and their caller stack) that block on futures. For semifutures, deferred work is performed on fiber-main context, so there is no concern of bleeding fibers. Reviewed By: yfeldblum Differential Revision: D21965552 fbshipit-source-id: 79941c3b73c67d63d83dcdc778c62a0fc9051de3
-
Chad Austin authored
Summary: I think LZ4 was disabled accidentally in our rocksdb getdeps build in D21319896. Enable it again on macOS and Linux, because otherwise this breaks people with EdenFS mounts containing LZ4-compressed proxy hashes. Reviewed By: xavierd Differential Revision: D21990356 fbshipit-source-id: b9166c2992ae51f09de3fa9a4f114143aa008f43
-
Lewis Baker authored
Summary: Adds a helper utility called 'tag_invoke' for defining CPOs that dispatch to a call to an overload of the ADL-name 'tag_invoke()' that takes the CPO as the first argument instead of to a CPO-specific ADL-name. This makes it possible to build generic adapters, such as type-erasing adapters, that can forward through calls to all CPOs through to an underlying object. Adds FOLLY_DECLVAL(T) helper macro used in the implementation of some of the traits. Reviewed By: yfeldblum Differential Revision: D17867173 fbshipit-source-id: fadae6ec97498008a5238036b7310a1e0ae119a2
-
- 13 Jun, 2020 1 commit
-
-
Nathan Bronson authored
Summary: folly::Hash<Range<T>> uses SpookyHashV2::Hash64 (for integral T). On 32-bit platforms we need an explicit cast to avoid a narrowing warning when converting this to size_t. (Note: this ignores all push blocking failures!) Reviewed By: shixiao Differential Revision: D21491467 fbshipit-source-id: 1cbd05553c61b8dccb664ec4478cfb0b049dc5b5
-
- 12 Jun, 2020 4 commits
-
-
Lucian Grijincu authored
Differential Revision: D21918702 Original commit changeset: 3213e9536147 fbshipit-source-id: 4e9394b2026f0d6d74e668c7c72b3612a42770ea
-
Giuseppe Ottaviano authored
Summary: This header is widely included (via `Future.h`) and instantiations of `UnboundedQueue`'s methods are expensive, so outline them (note that the template methods will only be instantiated if used, so that's fine). Reviewed By: philippv Differential Revision: D22014083 fbshipit-source-id: b6a71c38c142917e9e0d86fbb64a88462382952a
-
Matt Ma authored
Summary: This would allow us have better stack trace with inline functions in signal handler output. Reviewed By: luciang Differential Revision: D21918702 fbshipit-source-id: 3213e9536147759a4e59f5b6f68d22d941d36c7f
-
Yedidya Feldblum authored
Summary: [Folly] Wrap `_r_debug` per platform, since the way to get it varies by platform. Reviewed By: ot, luciang Differential Revision: D22004737 fbshipit-source-id: 6f6a6163c9709da0a5042b807cdd88fcdf2e57eb
-
- 11 Jun, 2020 3 commits
-
-
Andrii Grynenko authored
Summary: Thread fences are not supported by TSAN Reviewed By: yfeldblum Differential Revision: D21989519 fbshipit-source-id: bb657c82a64abe025e8f4c030916c0cacc3c0b81
-
Derek Brown authored
Summary: The `collectSemiFuture` method doesn't exist. Use `collectAllSemiFuture` instead. Pull Request resolved: https://github.com/facebook/folly/pull/1385 Reviewed By: yfeldblum Differential Revision: D21991532 Pulled By: DerekTBrown fbshipit-source-id: 4ba3378fe34b7e6bb910f7045267fdbab87ebb14
-
Yedidya Feldblum authored
Summary: Original commit changeset: 8eb472ce50bf This breaks time measurement to include measuring the wait preceding handler/callback invocation. Reviewed By: w-o-o Differential Revision: D21986042 fbshipit-source-id: 42701b929878c3f56d736de5ca0417814c64fce1
-
- 10 Jun, 2020 1 commit
-
-
Pranav Thulasiram Bhat authored
Summary: Debug builds can be prone to stack overflows if they are configurated to use the same stack sizes as prod builds. This diff effectively doubles the stack size for debug builds to provide more buffer against overflows. Reviewed By: yfeldblum Differential Revision: D21913754 fbshipit-source-id: bd32cc4dd9c79a50be178e5d6d30804a83e60ee4
-
- 09 Jun, 2020 10 commits
-
-
Mohamad Gebai authored
Summary: Returns the previous/next power of two that are strictly smaller/greater than the parameter. Reviewed By: yfeldblum, Gownta Differential Revision: D21920224 fbshipit-source-id: be919063379e5b231cc69d743128fcaeb0ea9f39
-
Yedidya Feldblum authored
Summary: [Folly] Cut the FOR_EACH_KV macro, which may be replaced by a combination of range-for and structured bindings. Differential Revision: D21826182 fbshipit-source-id: ce4712afd3d0d7806eb1fca8c97009da117f982e
-
Alexey Kuzmenko authored
Reviewed By: yfeldblum Differential Revision: D21921631 fbshipit-source-id: e905d6d2a96775a8c3b328fb78c8d32897f634f6
-
Junqi Wang authored
Summary: connect will automatically bind the socket if the socket is not bound yet Reviewed By: yangchi Differential Revision: D21845740 fbshipit-source-id: 27a5b44476dfc0b2ae5ff2f0a6c1bd4e976eadc9
-
Yedidya Feldblum authored
Summary: [Thrift] Dead Code: `TAsyncSocket`. Reviewed By: vitaut Differential Revision: D20851837 fbshipit-source-id: d4279fb1ab712f338d399220df26d56c4ab7076a
-
Yedidya Feldblum authored
Summary: [Folly] `EventBase::getRecentSteadyTime`, returning a recent `steady_clock::time_point` which is updated each pass through the event loop, but not for each ready event or function. Assuming everything in the loop is truly asynchronous, this permits callers to get a reasonably accurate approximation of the current time, but for many callers to blend or amortize the cost of getting that current time. May only be called from the running IO thread. Differential Revision: D21866783 fbshipit-source-id: 8eb472ce50bf012616e567b29f6724c67ef8d41a
-
Yedidya Feldblum authored
Summary: [Folly] `atomic_ref::compare_exchange_strong` and `atomic_ref::compare_exchange_weak`. Differential Revision: D21923944 fbshipit-source-id: 55620473ea253782cc1dbb95baef38c96a9fbc70
-
Andrii Grynenko authored
Summary: This provides a single mechanism to mitigate deadlocks in singleton destructors. Reviewed By: yfeldblum Differential Revision: D21827615 fbshipit-source-id: 090bad1a91238310e7814663193711df0f4d622a
-
Yedidya Feldblum authored
Summary: [Folly] Deduction guide for `atomic_ref`. Reviewed By: markisaa Differential Revision: D21923854 fbshipit-source-id: 8ad10692b95c653fc65302e6ad0118cbd615a62f
-
Mingtao Yang authored
Summary: All implementations of transports in practice were all AsyncTransportWrappers (AsyncSocket, AsyncSSLSocket, AsyncFizzBase, etc.). AsyncTransportWrapper was confusing. The only additional functionality that it provided was the ability to query underlying transports, a piece of functionality which makes just as much sense on AsyncTransport. The simplified model: "AsyncTransport deals with bidirectional I/O. It is both an AsyncReader, and an AsyncWriter. It may be nested." This diff changes AsyncTransportWrapper usages in folly to refer to AsyncTransport, and aliases AsyncTransportWrapper for compatibility. Reviewed By: yfeldblum Differential Revision: D21915048 fbshipit-source-id: 741fad91b8f7c8080f942168f5513b12602cfe9a
-
- 08 Jun, 2020 1 commit
-
-
Nikita Mikhaylov authored
Summary: It was very hard to read without any code highligting. Pull Request resolved: https://github.com/facebook/folly/pull/1364 Reviewed By: Orvid Differential Revision: D21921822 Pulled By: yfeldblum fbshipit-source-id: aa1bc39a5d38b055fe4370ccd4ac0b7d5e0273d4
-
- 07 Jun, 2020 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Add missing `#include <sys/wait.h>` in `folly/test/RandomTest.cpp`. Fixes https://github.com/facebook/folly/issues/1371. Reviewed By: Orvid Differential Revision: D21910410 fbshipit-source-id: 31a045960b2e67282fa77595dfdf840c338ef661
-