- 25 May, 2018 4 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Cut `Try` ctor taking `std::exception_ptr`. It is legacy, from a time before `exception_wrapper`. Reviewed By: marshallcline Differential Revision: D8110107 fbshipit-source-id: 2d8f4d56fdf1043012d72813a8686a8d02392a0b
-
Yedidya Feldblum authored
Summary: [Folly] Cut `Promise::setException` overload taking `std::exception_ptr`. It is from a time before `exception_wrapper`. Reviewed By: marshallcline Differential Revision: D8110117 fbshipit-source-id: f3a3f150267efc8c22a83dc90c7f52a728ef3de7
-
Yedidya Feldblum authored
Summary: [Folly] Cut `SharedPromise::setException` overload taking `std::exception_ptr`. It is from a time before `exception_wrapper`. Reviewed By: marshallcline Differential Revision: D8132039 fbshipit-source-id: eb82f6b766fd5cf82443ef447bbc751e7319f0ab
-
Jeffrey Shen authored
Summary: Currently, scheduling only allows specifying an interval, not the next run time. This makes it impossible to schedule for a given startDelay modulo the interval. This refactors things internally to use a customizable NextRunTimeFunc, and exposes a way to run at a consistent startDelay or pass in a NextRunTimeFunc. A use case: if we have n FunctionSchedulers schedule with different startDelays but the same interval, and they sync up (e.g. they all get blocked on some IO call, which eventually gets fixed), then they won't unsync or will unsync slowly. Reviewed By: yfeldblum Differential Revision: D7651111 fbshipit-source-id: 3c7a49dbfaa073b913107474f039a53a0a03cfa0
-
- 24 May, 2018 9 commits
-
-
Andre Pinto authored
Summary: This fixes a compile error on 32-bit platforms. Reviewed By: Orvid Differential Revision: D8147916 fbshipit-source-id: 86b66b684bed5ffb262630a361cf239948b8bb97
-
Andrii Grynenko authored
Reviewed By: yfeldblum Differential Revision: D8134836 fbshipit-source-id: 0b736bd61aa024574756634358ddc0e45c31944b
-
Marshall Cline authored
Summary: Add contracts to Promise Reviewed By: LeeHowes Differential Revision: D7923804 fbshipit-source-id: f7f29646d523ee69f00ac8576e2edf7e003f25e3
-
Subodh Iyengar authored
Summary: Detach evb from asyncudpsocket to be able to switch the socket between threads Reviewed By: yfeldblum Differential Revision: D8131599 fbshipit-source-id: 5d2a6f9b43b72076da1f6c09ce37b3c0bcd43db2
-
Maged Michael authored
Summary: Change name to reserve the word await for coroutines. Reviewed By: yfeldblum Differential Revision: D8076750 fbshipit-source-id: 38771dc22c39e194888ac272299ec1ae83df6389
-
Stepan Palamarchuk authored
Summary: `ConcurrentHashMap` provides `cbegin` and `cend`, but they are not suitable for range-based loops. This diff adds const versions of `begin` and `end` that are required for range-based loops. Reviewed By: yfeldblum Differential Revision: D8131142 fbshipit-source-id: b3af164d403c86ddfe4d27aaca293fbc4e2bb9d2
-
Marshall Cline authored
Summary: To expedite, I'm splitting the class-level summary-docs from the method-level docs. This is just the former. Reviewed By: LeeHowes Differential Revision: D7956570 fbshipit-source-id: b38539082ac0f6537f20a4f1d5a097407c277adc
-
Saif Hasan authored
Summary: fbthrift generate errorneous code when cpp type IOBuf pointer is used. Let's use IOBuf object instead as it is cheap to copy construct and underlying buffer is anyway shared when objects are copied. Reviewed By: plapukhov Differential Revision: D8130040 fbshipit-source-id: 3c109a85951054fed890707f56170b46cfefc917
-
Matthieu Martin authored
Summary: See code comment (Note: this ignores all push blocking failures!) Reviewed By: andriigrynenko Differential Revision: D8130722 fbshipit-source-id: c2a3e4b0de1fe7d07e28c4a7558e4367a1591ac1
-
- 23 May, 2018 15 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Give Try constructors and assignment operators pedantic exception specifiers deriving from corresponding exception specifiers of element type. Reviewed By: marshallcline Differential Revision: D8105158 fbshipit-source-id: 3cc9aae022ddaeef3ef2b742dde8ba084bfca830
-
Yedidya Feldblum authored
Summary: [Folly] Make `exception_wrapper` be `noexcept`-copyable. This works across the storage types: * InSitu - only store `noexcept`-copyable objects in-situ. * OnHeap - `std::shared_ptr` is `noexcept`-copyable. * Thrown - `std::exception_ptr` is in practice `noexcept`-copyable since it is a smart-ptr for thrown objects. Reviewed By: marshallcline Differential Revision: D8109991 fbshipit-source-id: e637c72466b22ab3076f52b4654a7538dcb1d30f
-
Andrii Grynenko authored
Reviewed By: yfeldblum Differential Revision: D8022229 fbshipit-source-id: 1ba1d777cbbeb1d1ad95dc3f4bae6b3d431b9440
-
Dan Melnic authored
Summary: Original commit changeset: 577063f920fb (Note: this ignores all push blocking failures!) Reviewed By: djwatson Differential Revision: D8126439 fbshipit-source-id: 30154738262274a688f432465119b0730d395df6
-
Yedidya Feldblum authored
Summary: [Folly] Invoke Futures `then`-continuations with the same cvref as passed. for example, if passed as `const&&`, invoke as `const&&`, and if passed as `volatile&`, invoke as `volatile&`. This brings a little more consistency to the library. Reviewed By: LeeHowes, phoad Differential Revision: D8109784 fbshipit-source-id: 8dd56c6197211091ed53eba94aeec9d604268d15
-
Yuchen Dai authored
Summary: Fix usage of atomic::store() where memory order is the only argument. It worked because of memory_order value is implicit casted to correct value luckily. Reviewed By: djwatson Differential Revision: D8108348 fbshipit-source-id: 7c4050b8cb50ec3ab6977cd9adce45249130320c
-
Orvid King authored
Summary: I broke the build because MSVC versions prior to Visual Studio 2017 Update 7 failed to compile it :) Reviewed By: yfeldblum Differential Revision: D8107563 fbshipit-source-id: 0c8f97325fd76a56d335ff71c9b969ad2bfaa5a1
-
Dan Melnic authored
Summary: Iterate only through the threads that have in use entries Reviewed By: djwatson Differential Revision: D7931363 fbshipit-source-id: 577063f920fb432e255a59e90faa32ab72107124
-
Yedidya Feldblum authored
Summary: [Folly] Minimize `AtFork` deps by using removing use of `checkPosixError`. The owning library is a bit heavyweight. Reviewed By: simpkins Differential Revision: D8109884 fbshipit-source-id: a0a41ff64fd44b843970ae30f8fdb8ff4ff22acd
-
Aaron Orenstein authored
Summary: Mark non-linux unused parameters as unused Reviewed By: yfeldblum, Orvid Differential Revision: D8103305 fbshipit-source-id: dc67849177e95718d0d6d658d1e2af88e867d81f
-
Orvid King authored
Summary: As per title. Reviewed By: yfeldblum Differential Revision: D8103967 fbshipit-source-id: 27fbc45df3ee1ec8934ea3c16aaa490fb06ef622
-
Orvid King authored
Summary: Visual Studio 2017 Update 7.2 is out, so this is no longer needed. This should fix GCC 4.9 as well :) Reviewed By: yfeldblum Differential Revision: D8104179 fbshipit-source-id: e3b01c2f7f0fe69dc7286d2cfaa5c2c99d821b23
-
Nick Terrell authored
Summary: * Use the new advanced API. * Support all advanced compression options and decompression window size. * Dictionary support is easy to add later when needed. * Remove the one-pass optimizations since zstd supports them by default now. Reviewed By: yfeldblum Differential Revision: D7898697 fbshipit-source-id: 42d84808a9bf2200ebfb8d2071b853960a19eb79
-
Matthieu Martin authored
Summary: A simpler manual executor that can be executed by a python thread, and release the GIL while waiting. Reviewed By: andriigrynenko Differential Revision: D8087779 fbshipit-source-id: a75ecbda3804a53f1b705aa04546b74368738b7b
-
Matthieu Martin authored
Summary: AsyncioLoopController is totally generic. We were able, after all, to put all the python specifics in the Executor, and keep it simple. I'm using it with ManualExecutor succesfully in my project. Reviewed By: andriigrynenko Differential Revision: D8085689 fbshipit-source-id: 007f65a72e41aa98113b7ee4e188719d9bc20340
-
- 22 May, 2018 5 commits
-
-
Petr Lapukhov authored
Summary: We use proxy to wrap the server side of TTLS connection, thus we can safely disable TTLS option on server side. This helps with cases where people create server socket, then pass the FD to child, and that FD is a UNIX socket because of TTLS. Reviewed By: djwatson Differential Revision: D8096569 fbshipit-source-id: 657c3cee3a9df49cbb80fad771a897264d5277f4
-
Murali Vilayannur authored
Summary: Diff exposes a more convenient constructor interface in CPUThreadPoolExecutor that is analogous to the existing constructor interface with the only exception that it takes a pair of min and max number of threads that drives the executor. Reviewed By: djwatson Differential Revision: D8088545 fbshipit-source-id: 3ee92070335267948332ef75d67817d25436262f
-
Ivan Mylyanyk authored
Summary: `std::vector<bool>` is a bit specific ([1], [2] and [3]), so element access doesn't return bool, but `std::vector<bool>::reference` instead. Folly did not know how to cast it to bool. [1]: http://en.cppreference.com/w/cpp/container/vector_bool [2]: http://en.cppreference.com/w/cpp/container/vector_bool/reference [3]: https://en.wikipedia.org/w/index.php?title=Sequence_container_(C%2B%2B)&oldid=767869909#Specialization_for_bool Reviewed By: yfeldblum, ot Differential Revision: D7986013 fbshipit-source-id: 01c1350b3f6815e9da4ce6305f25e4b9b1ca9d6d
-
Andrii Grynenko authored
Summary: This is blocking D8022229 Reviewed By: yfeldblum Differential Revision: D8086230 fbshipit-source-id: 3d6f2c32190b405b9089c9d41378827e8cb2bb80
-
Yedidya Feldblum authored
Summary: [Folly] Update some outdated fields in Futures Core test - the callback type and the interrupt lock type have been changed. Reviewed By: Orvid Differential Revision: D8084531 fbshipit-source-id: 3991360052c9309b531b7be64ef8e92d5ce6200c
-
- 21 May, 2018 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Introduce makePromiseContract, for producing a paired promise-and-semi-future or a paired promise-and-future, depending on which overload is invoked. It is not ideal that a future is gotten from a promise, but only once. Rather, it is ideal that they be created together. C++17 code may use structured bindings: ```lang=c++ auto [p, f] = makePromiseContract(); // promise with semi-future auto [p, f] = makePromiseContract(&e); // promise with future, given executor e ``` Reviewed By: LeeHowes Differential Revision: D7984050 fbshipit-source-id: 52ee5624fde7c48aa0e81243564ad067c6c6919f
-
- 20 May, 2018 2 commits
-
-
Orvid King authored
Summary: This will allow incremental migration of `collectAll` to `collectAllSemiFuture`. Once everything is migrated to `collectAllSemiFuture`, `collectAll` will change to be the exact same as `collectAllSemiFuture`, then all uses will be moved back to `collectAll` and `collectAllSemiFuture` will be removed. Reviewed By: yfeldblum Differential Revision: D8015664 fbshipit-source-id: 07a154dc733fd7e1e003f4c103355e7b5d1ad1b5
-
Maged Michael authored
Summary: Add hazptr_domain* member to hazptr_rec that never changes. Remove hazptr_domain* member from hazptr_holder. The primary optimization is reducing the sizes of hazptr_holder and hazptr_array from two pointers to one pointer per owned hazard pointer. A secondary advantage is allowing swap of an individual holder in hazptr_array with a hazptr_holder object or an element of another hazptr_array under the conditions: both are either empty or nonempty and if nonempty both hazptrs belong to the same domain. Performance effects on hazptr_holder: + Half the steps for empty construction, move and swap. + One less step in typical construction. - Indirect instead of direct read of pointer to domain, but indirection is likely to be a cache hit if the hazptr was used recently. Measurements: - Faster construction/destruction of hazptr_array<3>. 7.5 ns. instead of 8.5 ns. - No regression in other microbenchmarks. Reviewed By: davidtgoldblatt Differential Revision: D8010395 fbshipit-source-id: 01ffd26f675e57547b1506b777c79d18052ccc65
-
- 19 May, 2018 4 commits
-
-
Maged Michael authored
hazptr: Link counting. Protecting descendants of protected objects. Mutable and immutable links. Automatic retirement. Summary: The class hazptr_obj_linked includes all the reference counting and automatic retirement mechanisms. It supports: - Mutable and Immutable links. - Certain and uncertain removal. With certain removal users call retire. With uncertain users call unlink when an object is unlinked. The library determines automatically when to retire such object. - E.g., UnboundedQueue uses immutable links with certain removal. - E.g., ConcurrentHashMap uses mutable links with uncertain removal. Reviewed By: djwatson Differential Revision: D7674658 fbshipit-source-id: 948f5c3690367deaa0e2023a2def3bed2c22b9f0
-
Andrii Grynenko authored
Summary: This makes keep-alive join also happen if stop/join are called directly. Reviewed By: yfeldblum Differential Revision: D8060479 fbshipit-source-id: 1d1c0cdbcaac2e439aee9ad14f00fa7e4fda2339
-
Andrii Grynenko authored
Summary: This is useful to fix legacy tests that use loop(), as keep-alive tokens are used more widely. (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum Differential Revision: D8065959 fbshipit-source-id: 2e7a27f538ac9d36eeea7ba3a882633a193141d1
-
Yedidya Feldblum authored
Summary: [Folly] Split Futures exceptions by `Promise` vs `Future`. * Move `Promise` exceptions into the `Promise` header. * Move `Future` exceptions into the `Future` header. * Split `NoState` into `PromiseInvalid` and `FutureInvalid`. * Remove the newly-empty exceptions header. Reviewed By: andriigrynenko Differential Revision: D7966499 fbshipit-source-id: 2dc6d2a941493979ebf47b3e70e5cf6a6fbd33cf
-