- 22 Oct, 2019 4 commits
-
-
Dan Melnic authored
Summary: Allow AsyncServerSocket::bind to be called for multiple addrs (same as for port bind) Reviewed By: yfeldblum Differential Revision: D18046496 fbshipit-source-id: efde498fbaa02357d7c66905b8c1e5e839062076
-
Andrii Grynenko authored
Reviewed By: yfeldblum, lewissbaker Differential Revision: D18052431 fbshipit-source-id: 9fb1b3faba25093cf67bdf9c6cbe5cc70794deee
-
Lewis Baker authored
Summary: Generalises the specialisation of collectAllRange() and collectAllWindowed() on a std::vector<Task<T>> to now work for any std::vector<SemiAwaitable>. This will allow them to work when passed a std::vector<TaskWithExecutor<T>>. Reviewed By: andriigrynenko Differential Revision: D18049190 fbshipit-source-id: 658213f93ff3eadda041ac2262cc6bcb759e331c
-
Yedidya Feldblum authored
Summary: [Folly] Extract `strlcpy` to a new c-string lib in `folly/lang/CString.h`. This new lib would be for routines that should but don't appear in `<cstring>`. Reviewed By: marcinpe Differential Revision: D18032925 fbshipit-source-id: 746851f68e86a5ec2bea5cc659c19c4fe2f0f02a
-
- 21 Oct, 2019 5 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Guard the forward declaration of `fibers::Baton` by the same condition which determines whether `fibers::Baton` is ever used in futures. Reviewed By: lewissbaker Differential Revision: D17962552 fbshipit-source-id: 2494026999cd170c36adec91108732254212abf1
-
Yedidya Feldblum authored
Summary: [Folly] Prefer a C++ symbol over back-defining `MAP_POPULATE`. Reviewed By: nbronson Differential Revision: D18024313 fbshipit-source-id: 7f3b754a7911d6947e5a6f34860f9f0d3833aa51
-
Yedidya Feldblum authored
Summary: [Folly] Add missing `inline` to `co_current_executor`. Reviewed By: ericniebler Differential Revision: D18034078 fbshipit-source-id: 8c212ef6278112cc8e90075494a3038d9111bb64
-
Nathan Bronson authored
Summary: The PAUSE instruction's latency varies widely across x64 architectures, resulting in too much spinning on Skylake in some scenarios. This diff switches to using cycle counts to limit spinning on x64, so that the minimum and maximum spin durations are independent of asm_volatile_pause's latency. Reviewed By: yfeldblum Differential Revision: D17961663 fbshipit-source-id: 6170bfa48d007ca21b73b1a5c7e68da0043cda2c
-
Wez Furlong authored
Summary: This avoids invalidating the entire build in response to just running `hg amend`, which is frustrating and slow. Reviewed By: chadaustin Differential Revision: D18005409 fbshipit-source-id: ef93313859919298be78204046eb08bcadc5398e
-
- 19 Oct, 2019 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Backport invocability variable templates: `is_invocable_v`, `is_invocable_r_v`, `is_nothrow_invocable_v`, `is_nothrow_invocable_r_v`. And for the member-invoke and free-invoke traits. Reviewed By: ericniebler Differential Revision: D17950331 fbshipit-source-id: 5409d7a72116b0976573e1f64760c5ef9274966f
-
- 18 Oct, 2019 4 commits
-
-
Mingtao Yang authored
Summary: If CH parsing is enabled, also parse out the ServerName extension. OpenSSL 1.1.1 changes the behavior of `SSL_get_servername`: an SNI value is stored in the underlying SESSION if and only if both parties negotiated that SNI. There are some situations where one would wish to retrieve the original ServerName that the client sent. Reviewed By: knekritz Differential Revision: D17893443 fbshipit-source-id: b29ee42e90629c869dd5e68c93c7cb2abc19745f
-
Lewis Baker authored
Summary: No longer allow a child task's modifications to the RequestContext made before it's first suspension point to bleed into the next child task's context. Now always restore the parent task's RequestContext before starting subsequent tasks. Reviewed By: andriigrynenko Differential Revision: D17846070 fbshipit-source-id: 44e206d4c833759fc36c7d1bd0f3545ca6bb9ab1
-
Dan Melnic authored
Summary: Relax DFATAL message Reviewed By: yfeldblum Differential Revision: D18001089 fbshipit-source-id: 2027d0257e1cba6905dc4eb1863b70a8fe6a7366
-
Alexander Zinoviev authored
Summary: trim, ltrim and rtrim are similar to ltrimWhitespace, rtrimWhitespace and trimWhitespace but you can specify what you want to remove Reviewed By: yfeldblum Differential Revision: D17946658 fbshipit-source-id: 9bdc5e6eb810e628a8c16b5142c17a3313f884f2
-
- 17 Oct, 2019 7 commits
-
-
Rodolfo Granata authored
Summary: ThreadPoolExecutor::getPoolStats depends on derived classes implementation. Calling `getPoolStats` is specially useful from `ThreadPoolExecutor::withAll`. This change moves registration of thread pool executor instances to derived classes to avoid `ThreadPoolExecutor::withAll` racing with thread pool destruction while calling `getPoolStats`. Reviewed By: yfeldblum Differential Revision: D17965135 fbshipit-source-id: 637de55ed78b085dc86fffa0e0f4a66cd4cfcede
-
Dan Melnic authored
Summary: keepAliveRelease code reorg Reviewed By: kevin-vigor Differential Revision: D17835172 fbshipit-source-id: 48c60b04324f0d9bd1ac628e2625d3d4d2654c99
-
Dan Melnic authored
Summary: Add missing switch case Reviewed By: yfeldblum Differential Revision: D17945170 fbshipit-source-id: 8128c40e1c86b2a5ff8d1bad3c0e9fe197adc174
-
Wez Furlong authored
Summary: this should help avoid this particular error: ``` IOError: [Errno socket error] [Errno 11001] getaddrinfo failed ``` Reviewed By: chadaustin Differential Revision: D17886598 fbshipit-source-id: bd9f5b84ebd7ca5c339be3afec3a975fa907d052
-
Wez Furlong authored
Summary: This diff allows passing a watchman version number override via the environment as well as via the cmake `WATCHMAN_VERSION_OVERRIDE` option. To help invalidate the build I've added a new section to the manifest files that allows listing out additional env vars that the project hashes should be sensitive to. The effect of this is that we'll re-run the cmake configure step if the listed env vars are changed. Reviewed By: Ben0mega Differential Revision: D17865896 fbshipit-source-id: 8ea5572b0b9b7af95ec5c310e494cb17a139ced4
-
Wez Furlong authored
Summary: testpilot's defaults assume a bigger machine than some of our laptops Reviewed By: fanzeyi Differential Revision: D17878120 fbshipit-source-id: e01f1f9c77a4f5f011051c9c642dbe934c66bc0b
-
Lucas Dobson-Defenbaugh authored
Summary: During shutdown there's a race condition in IOThreadPoolExecutor::getEventBase where a thread is created in ensureActiveThreads, and then destroyed before pickThread() is called. This adds the same guard that exists in add(). Reviewed By: yfeldblum Differential Revision: D17955227 fbshipit-source-id: 042cb5c42056a9da4578571fb10936bbc477c4ff
-
- 16 Oct, 2019 7 commits
-
-
Eric Niebler authored
Summary: Add a portability macro for testing whether the compiler supports C++17's inline variables. Reviewed By: yfeldblum Differential Revision: D17957184 fbshipit-source-id: bff7d2bc15867e32f787860b4f8e5a0176ac1017
-
Yedidya Feldblum authored
Summary: [Folly] Fix wrong definition of `FOLLY_HAVE_GROUP_VARINT` when group varint is unsupported. Reviewed By: Orvid Differential Revision: D17961015 fbshipit-source-id: 3c82aaaf4b257180ab0956e4b181bfd619d7adda
-
Matt Ma authored
Summary: /home/folly/folly/experimental/test/QuotientMultiSetTest.cpp:60:29: error: missing template arguments before 'reader' folly::QuotientMultiSet reader(data); Reviewed By: vitaut Differential Revision: D17959566 fbshipit-source-id: 02fec44b3d644eea0213895aa4df70349ef7d062
-
Wei Liu authored
Differential Revision: D17908896 Original commit changeset: 85847fc17f4a fbshipit-source-id: 9b2bd8c11881cad18cffea0e14349e25d743b150
-
Rodolfo Granata authored
Summary: Calling `folly::ThreadPoolExecutor::withAll` is powerfull when combined with `folly::ThreadPoolExecutor::getPoolStats`. However getPendingTaskCountImpl being pure virtual can trigger `__cxa_pure_virtual ... std::terminate()` while object is partially destructed. This change signals implementors of derived clases to write a body for getPendingTaskCountImpl while allowing calling getPoolStats -> getPendingTaskCountImpl within a try/catch block. Reviewed By: yfeldblum Differential Revision: D17915523 fbshipit-source-id: 2ffad7076313407969d88c75c7e457fa4e7e2d6d
-
Joe Loser authored
Summary: - There is not an easy way to check if a given type is an instantiation of a class template. - The common solution is to write a custom trait each time and specialize it for the given instantiation so that the trait returns `std:true_type`. - Add `is_instantiation_of` to help with DRY in custom traits for checking if a type is an instance of a given class template. Note that this does not work when the class template has a mix of type and non-type template parameters. It only works with types. Pull Request resolved: https://github.com/facebook/folly/pull/1184 Reviewed By: vitaut Differential Revision: D16161679 Pulled By: yfeldblum fbshipit-source-id: c933fd3db7c56f61b6784fdcd199ff7963d61d8f
-
Liu Cao authored
Summary: The deadlock repro is described https://github.com/facebook/folly/issues/1211. Fix is to check the working epoch before retire() starts the sync work. Reviewed By: yfeldblum Differential Revision: D17908896 fbshipit-source-id: 85847fc17f4a75058d4a72c43dba0c570a2593d6
-
- 15 Oct, 2019 7 commits
-
-
Felix Handte authored
Summary: As title. Reviewed By: yfeldblum Differential Revision: D17937014 fbshipit-source-id: a0ff5f5f9cbbb182794dc564610d7adb9c7c8d08
-
Yedidya Feldblum authored
Summary: [Folly] Fix `Json.SortKeys` test when `F14NodeMap` may randomize table iteration order. Reviewed By: shixiao Differential Revision: D17903465 fbshipit-source-id: 00f1a8c441af3e11815a4312f6dc810ec9455a5e
-
Chad Austin authored
Summary: Unconditionally sleeping for 100ms in the wait polling loop has high average latency. If a process exits just after the initial wait() call, it's better to poll again sooner. Start with a 2ms sleep and double it every sleep, capping out at 100ms. Reviewed By: yfeldblum, mzhaom Differential Revision: D17769851 fbshipit-source-id: efec8fdb8c2199b8db29b46b8c43fdaac56f69a8
-
Chad Austin authored
Summary: `waitOrTerminateOrKill` fills the gap between `wait()` and `terminateOrKill`. It allows giving the subprocess a chance to shut down cleanly (after closing its stdin pipe, for example), but avoids waiting forever or leaking a child process. Reviewed By: yfeldblum, mzhaom Differential Revision: D17769090 fbshipit-source-id: 8940fd63f7eb9c09ef293c89a5e97f69805735ff
-
Matt Ma authored
Summary: QuotientMultiSet is a space-efficient static data structure to store a non-decreasing sequence of b-bit integers. If the integers are uniformly distributed lookup is O(1)-time and performs a single random memory lookup with high probability. Reviewed By: ot Differential Revision: D17506766 fbshipit-source-id: b3e7a22dd193672fadb07d4cccb8b01bedae7cf9
-
Joe Loser authored
Summary: - Document in the `README.md` how to build tests as part of the CMake build. Closes https://github.com/facebook/folly/issues/1240 Pull Request resolved: https://github.com/facebook/folly/pull/1244 Differential Revision: D17927395 Pulled By: yfeldblum fbshipit-source-id: 6b638ac807886b505b69063f2a47162f3f3fc8de
-
Giuseppe Ottaviano authored
Summary: The standard only requires `To` to be trivially copyable, not trivial. Reviewed By: yfeldblum Differential Revision: D17916612 fbshipit-source-id: 80ae35672ea4664fe4204c8181ac6402065c4e03
-
- 14 Oct, 2019 5 commits
-
-
Lewis Baker authored
Summary: Made a slight tweak to the collectAll benchmark for the coroutine implementation to avoid allocating additional coroutine frames. Reviewed By: andriigrynenko Differential Revision: D17917156 fbshipit-source-id: 890a2ab33eb53050930d4547119d30a9c161887e
-
Chad Austin authored
Summary: std::chrono is less prone to error than specifying timeouts in `int` seconds. Reviewed By: yfeldblum, mzhaom Differential Revision: D17767787 fbshipit-source-id: 5bb23d3a78e6e798e7b10331dc416e24d5a8746d
-
Chad Austin authored
Summary: Synchronized::operator-> is dangerous because it's very easy to implicitly acquire locks in ways that don't form a coherent locking model. Replace uses of it in folly in preparation for removing or marking the function deprecated later on. Reviewed By: yfeldblum Differential Revision: D17862465 fbshipit-source-id: 45d3b0d738941c3faa6d73418e79dcb8a1259e98
-
Andrii Grynenko authored
Reviewed By: yfeldblum Differential Revision: D17892633 fbshipit-source-id: 1b4b2cffb040b1abf709ea2ccd4015426398dda0
-
Andres Suarez authored
Reviewed By: yfeldblum Differential Revision: D17889050 fbshipit-source-id: 323a2a5796b4f06c2fe4c84a714a763aa3da4866
-