- 23 Dec, 2020 1 commit
-
-
Andrii Grynenko authored
Differential Revision: D25683616 fbshipit-source-id: 7f199b0e43e0a5a76c4cf16412b22abdc28833ac
-
- 22 Dec, 2020 4 commits
-
-
Yedidya Feldblum authored
Summary: Fix `Arena` bytes-used accounting across calls to member `merge`. Reviewed By: luciang Differential Revision: D25656949 fbshipit-source-id: b230b0cdbf51b146fd566cbf688f49817bdf874d
-
Yedidya Feldblum authored
Summary: [folly] Rename coro `Error.h` to `Result.h` since it has multiple result types. Reviewed By: Mizuchi Differential Revision: D25625178 fbshipit-source-id: 45f8194922b764429969329563a4695b1c13da6f
-
Yedidya Feldblum authored
Summary: Fix `Arena` bytes-used accounting across calls to member `clear` after a sequence of all-large allocations. Reviewed By: luciang Differential Revision: D25656875 fbshipit-source-id: e79aca5f58b61bf1bd4790f8badd0dad6063a6ed
-
Andrii Grynenko authored
Summary: folly::Singleton is used for singletons that manage resources (thread, fds etc.) and it's generally not safe to use previously created folly::Singletons in child process after fork. Reviewed By: yfeldblum Differential Revision: D25292667 fbshipit-source-id: 5343d26c72bb9203429a918a3bb5d458c44e9f3b
-
- 21 Dec, 2020 5 commits
-
-
Arthur Kushka authored
Summary: Recently I found that its impossible to access elevated Watchman daemon from non-elevated process on Windows. ``` events.js:174 throw er; // Unhandled 'error' event ^ Error: connect EPERM \\.\pipe\watchman at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1106:14) Emitted 'error' event at: at Socket.<anonymous> (C:\open\ovrsource\unity\socialvr\_js\node_modules\fb-watchman\index.js:118:12) at Socket.emit (events.js:198:13) at emitErrorNT (internal/streams/destroy.js:91:8) at emitErrorAndCloseNT (internal/streams/destroy.js:59:3) at process._tickCallback (internal/process/next_tick.js:63:19) ``` To fix this, it was suggested by wez to use [his library](https://github.com/wez/EleDo) to force Watchman daemon always start in normal mode on Windows. In this stack of commits I did integrated his library into project and used it to force daemon restart in normal mode when spawned from elevated terminal. To make it happen, I checked-in library sources and created proxy project which depends on the initial library and contains header bindings and cmake configuration. I did copy pasted Rust cmake macroses from another facebook project - eden, and also created analogue of autogen.sh but for Windows - autogen.cmd. Pull Request resolved: https://github.com/facebook/watchman/pull/878 Test Plan: Launch elevated terminal Start watchman.exe produced from sources Observe daemon starting and answering In process monitor, observe watchman.exe process running under user group Reviewed By: fanzeyi Differential Revision: D25595879 Pulled By: arhelmus fbshipit-source-id: 15eb29adcf5bd4a5708b6533a1b2bacbf13f431c
-
Yedidya Feldblum authored
Summary: [Folly] Cut `FOLLY_HAVE_MEMRCHR` since it is now unused. Reviewed By: Orvid Differential Revision: D22130149 fbshipit-source-id: b10c5a52354f5c549d96b54e0c165f08b96612b1
-
Pranjal Raihan authored
Summary: Since this API is discouraged from use, users should call `folly::observer_detail::ObserverManager::waitForAllUpdates` (and face whatever consequences may come with it). Reviewed By: yfeldblum Differential Revision: D25629064 fbshipit-source-id: 141b27bbc4f7cf9b628f15f837c38dd4d8a04f31
-
generatedunixname89002005325676 authored
Reviewed By: zertosh Differential Revision: D25662961 fbshipit-source-id: f5811a5797fd6dc8733fdf86f35c93d12a08d53a
-
Yedidya Feldblum authored
Summary: Fix `Arena` total-size accounting across calls to `clear`, as reported by member `totalSize`. Reviewed By: luciang Differential Revision: D25656867 fbshipit-source-id: b5c7bb0e95199a9fa2c94c04de65b8f494eef146
-
- 20 Dec, 2020 3 commits
-
-
Orvid King authored
Summary: Don't use gtest/gtest.h directly. Reviewed By: yfeldblum Differential Revision: D25659806 fbshipit-source-id: a8dd0da814465a787ab7904bdd0256f22b6e3ed8
-
Orvid King authored
Summary: As per title Reviewed By: yfeldblum Differential Revision: D25636982 fbshipit-source-id: a59c2325558175e122941000ab645c8735a3a425
-
Yedidya Feldblum authored
Summary: Use `throw_exception` consistently in `Arena` for consistency. Differential Revision: D25637401 fbshipit-source-id: 92cda5acc09b871fed78044fa3f3fa2c41b01609
-
- 19 Dec, 2020 6 commits
-
-
Yedidya Feldblum authored
Summary: [folly] `asan_region_is_poisoned` to wrap Address Sanitizer's `__asan_region_is_poisoned`. Reviewed By: ot, luciang, markisaa Differential Revision: D25651040 fbshipit-source-id: 0c8f1d0203ada43746b5e2e71c1bd8b883248f68
-
Alfred Fuller authored
Summary: All changes were automated Reviewed By: Orvid Differential Revision: D25507555 fbshipit-source-id: c0be9a04b8a5f502f4753ce6e163a78c428bfad6
-
Dan Melnic authored
Summary: Fix QUIC OSS build (Note: this ignores all push blocking failures!) Reviewed By: danobi Differential Revision: D25645282 fbshipit-source-id: fcb71d4e930d7ac3802f31d71599338fb346eb80
-
Orvid King authored
Summary: Required for Windows with the more strict include order via upcoming formatting diffs. Reviewed By: yfeldblum Differential Revision: D25636437 fbshipit-source-id: 0a5fd400f63220400f89affb11b66e9692e9b352
-
Orvid King authored
Summary: Because folly can't depend on common. Reviewed By: yfeldblum Differential Revision: D25636772 fbshipit-source-id: d7b049330c9ca68eb4013fde5ca6de9413433823
-
Misha Shneerson authored
Summary: Allow scheduling a "poison" task to indicate shutdown Reviewed By: andriigrynenko Differential Revision: D25609015 fbshipit-source-id: 8a42b99b402d78db7cfa3bd194730bb6948567c6
-
- 18 Dec, 2020 7 commits
-
-
Andrew Huang authored
Summary: Currently doesn't do anything since TLS 1.3 is not yet enabled by default. Once it is, calling disableTLS13() on a context will set the max TLS version to TLS 1.2. Reviewed By: mingtaoy Differential Revision: D25642589 fbshipit-source-id: 0e580916b929111ed9721ca142b59eab0ea187df
-
Shai Szulanski authored
Summary: Allows use with std::optional when available Reviewed By: WillerZ Differential Revision: D25618828 fbshipit-source-id: 3e039406ff1e885fd1767148b907635b23f7a88b
-
Yedidya Feldblum authored
Summary: Use comparison expectations like `EXPECT_GE` in `Arena` test as v.s. `EXPECT_TRUE` with the comparison inside. Reviewed By: markisaa Differential Revision: D25631097 fbshipit-source-id: 4fb430f34d7683e3b82dd3fbb4408360f8990353
-
Alfred Fuller authored
Summary: All changes were automated Reviewed By: Orvid Differential Revision: D25507575 fbshipit-source-id: cbddef5a79008d9bf8b6e0234e6433084e5d8df9
-
Orvid King authored
Summary: These are the only files out of hundreds in folly that have them, so just remove them entirely. Reviewed By: yfeldblum Differential Revision: D25612198 fbshipit-source-id: 88d4f5c2ffa08d45d0a901c9ef874cddc2730291
-
Maged Michael authored
Summary: Eliminate noisy log message and provide the intended deadlock clue in a function name. Reviewed By: yfeldblum Differential Revision: D25627130 fbshipit-source-id: 8d92007d4fa7eff1efb5857f7f49bebde2d59b70
-
Orvid King authored
Summary: Specifically, ending in Test, singular, and reflecting the file being tested in full. Reviewed By: yfeldblum Differential Revision: D25612187 fbshipit-source-id: 514477e08b9e231d8574cae19640717b689b7d56
-
- 17 Dec, 2020 5 commits
-
-
Rounak Tibrewal authored
Differential Revision: D25549986 (https://github.com/facebook/folly/commit/9a83e4242a933f91c9339b4c6d223267a43a89c1) Original commit changeset: fd323e2e8cbf fbshipit-source-id: af2bdb9f66d23d144f7e2e96118727d8b158f83f
-
Dan Melnic authored
Summary: folly::AsyncSocket: propagate finishFail ex (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum Differential Revision: D25479314 fbshipit-source-id: 683e1e118ace2ea983bde78d8afddb84dab69f6f
-
Dan Melnic authored
Summary: AsyncUDPSocket: multi release pacing for UDP GSO (Note: this ignores all push blocking failures!) Reviewed By: mjoras Differential Revision: D25451694 fbshipit-source-id: 3550a3744b407cbc40efebe759f472ee9f40a5b8
-
Giuseppe Ottaviano authored
Summary: The `StringPiece` overloads of comparisons operators are inefficient to compile, as they get in the overload set of every comparison and then get ruled out by SFINAE (which require trait instantiations). Move them instead to friend inlines, where they enjoy the expected implicit conversion rules. (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum Differential Revision: D25549986 fbshipit-source-id: fd323e2e8cbf4f3dd29508b8aff1cfaba2784f4f
-
Yashwanth Nannapaneni authored
Summary: Previously theFOLLY_HAVE_LIBUNWIND macro would evaluate to false even if LibUnwind was available. Pull Request resolved: https://github.com/facebook/folly/pull/1501 Reviewed By: yfeldblum Differential Revision: D25583562 Pulled By: Orvid fbshipit-source-id: 7dac5afa1f0f24747f4accf2e08b804ab12e416f
-
- 16 Dec, 2020 3 commits
-
-
Misha Shneerson authored
Summary: Motivation: we sometimes need to add concept of lower priorities on top of executors which provide custom scheduling via custom APIs such `EDFThreadPoolExecutor`. This adapter wraps an arbitrary executor, and adds an additional queue. Tasks from this queue will be fetched and placed on the wrapped executor's queue in a metered fashion - in particular we only allow up to "maxReadAtOnce" tasks to be placed onto the main executors queue. Once work is added to metered queue, the adapter schedules callback into the wrapped executor. When callback is executed it: 1) fetches head task from the queue 2) fetches up to maxReadAtOnce - 1, and reschedules those onto the main executor. 3) reschedules itself onto the main executor 4) executes the task fetched at stage 1. While in theory this algorithm does not provide strong priority guarantees, in practice lower priority tasks are almost always yielding to the higher priority tasks. This primitive also allows interesting compositions to be built: 1. multiple priorities scheduling can be achieved by chaining metered adapters. 2. Fair queue scheduling (e.g. round robin consumption from N queues) can be achieved by creating N metered adapters wrapping the same executor. (Note: this ignores all push blocking failures!) Reviewed By: prshreshtha Differential Revision: D24983861 fbshipit-source-id: 1a4ce61fc7cc706889da9724de71822bfaab440b
-
Nanshu Chen authored
Summary: So it may be easier to use in Python code. A lot of Python code will check the type with this: ``` if isinstance(obj, (bytes, memoryview)): ... ``` Currently, the `IOBuf.__iter__` returns a `cython.view.memoryview` c-type (which can be only "cimport" in cython but not able to "import), and to make it useable in scenarios like above, we have to explicitly cast it to builtin `memoryview`. With this change, the use of the iterator is more natural. Reviewed By: fried Differential Revision: D25577842 fbshipit-source-id: 6b22028d06bba639fca32f7de3a063e1fb1baa15
-
Nikita Lutsenko authored
Summary: Benchmarks are great, but are missing parts that allows them to be run outside of raw binary, like in mobile context, where we generally want to showcase the list of results, instead of pretty printing them to stdout. To allow for that - adding a new public API, and restructuring few things, to code dedupe and still maintain the same functionality. Reviewed By: Orvid Differential Revision: D25552087 fbshipit-source-id: 946a9fbcac3faff0a69f3d86d20f3621649c7e5a
-
- 15 Dec, 2020 4 commits
-
-
Andrew Huang authored
Summary: This new API has a few benefits: 1. It allows `getSSLSession` to support TLS 1.3 session resumption by returning a mutable session wrapper as opposed to the immutable `SSL_SESSION*` object. 2. OpenSSL `SSL_SESSION*` objects require the caller to keep accurate reference counts. Failure to do so can result in memory leaks or use-after-free errors. 3. This design abstracts away OpenSSL internals, which are unnecessary for the caller to perform session resumption. Reviewed By: mingtaoy Differential Revision: D24239802 fbshipit-source-id: cd3e90217717394f32dc6a2281e7a40c805990b2
-
Pranjal Raihan authored
Summary: In most cases, `folly::observer::waitForAllUpdates` should not be needed. However, the asynchronous nature of observers break some basic assumptions that most users expect. Such as: ``` thing.set(value); EXPECT_EQ(thing.get(), value); ``` If `thing` is using `folly::observer` underneath the hood, the asynchrony is passed on to the user which is very easy to overlook, leading to bugs. The API of `thing` might want to enforce that when `thing.set` returns, all observed values will have been updated. Blocking is a perfectly okay solution in cases we don't expect an observer to be updated frequently. Differential Revision: D25542376 fbshipit-source-id: c83909807fbf36e0311a45b667da94c43751a1da
-
Shai Szulanski authored
Summary: Mirrors Task. One behavioral difference is that yielding an empty Try from a Task converts into a UsingUninitializedTry exception, while for AsyncGenerator it converts into a return. This is for consistency with Thrift's ClientBufferedStream to avoid confusing users, but there is also an argument for converting to UsingUninitializedTry instead. Reviewed By: yfeldblum Differential Revision: D25379361 fbshipit-source-id: 2a2878185696566b29345c99fee7ba74bef4ae8a
-
Pranav Thulasiram Bhat authored
Summary: This diff introduces a generic abstraction to convert a python error (set by a C-API call) into an informative C++ exception. The main motivation for this is to improve the error handling behavior when dealing with failed cython api module imports. This diff adds one callsite to the new abstraction in fiber.cpp to demonstrate its usage. Reviewed By: yfeldblum Differential Revision: D25469594 fbshipit-source-id: e9f83c06460f35fa76030ceae9726297276db850
-
- 14 Dec, 2020 1 commit
-
-
Daan De Meyer authored
Summary: When SingleProducer is disabled, AsyncPipe's method becomes thread-safe and can be called by multiple threads simultaneously. This is useful in a use case where a long running operation is being executed by multiple threads that all want to post status updates to the same AsyncPipe instance. Reviewed By: iahs Differential Revision: D25494695 fbshipit-source-id: 1d0a74ec69dc8f64c171e21be612d211919cda4b
-
- 12 Dec, 2020 1 commit
-
-
Alfred Fuller authored
Summary: All changes were automated Reviewed By: Orvid Differential Revision: D25507592 fbshipit-source-id: 3ce36732a2d1c691087fbd95c3e87f554f4d8d98
-