- 31 Mar, 2018 2 commits
-
-
Orvid King authored
Summary: It's unused, remove it. Reviewed By: yfeldblum Differential Revision: D7462683 fbshipit-source-id: 604c5691d69f2576c83c25350d29515efbc77a7b
-
Orvid King authored
Summary: `timespec` is defined in `sys/time.h`, so don't rely on `<chrono>` including it. Reviewed By: yfeldblum Differential Revision: D7462731 fbshipit-source-id: 590954e2230a0da322e2f5eb966bb49b18aa56f7
-
- 30 Mar, 2018 3 commits
-
-
Seva Oparin authored
Summary: Add API to AsyncUdpSocket to support three options on the socket. - SO_RCVBUF and SO_SNDBUG options are responsible for the size of the queues that contain received and sent messages, respectively. - SO_BUSY_POLL sets the approximate time in microseconds to busy poll on a blocking receive when there is no data Details in socket man: http://man7.org/linux/man-pages/man7/socket.7.html Reviewed By: yfeldblum Differential Revision: D7372123 fbshipit-source-id: 5fd92489cbe86879d63df208c3821febdadb0020
-
Orvid King authored
Summary: MSVC calls this out explicitly as a non-standard cast and errors. Reviewed By: yfeldblum Differential Revision: D7451404 fbshipit-source-id: 9261b15fdc47b6ffbc1b53e83cbfbe9f9af894a9
-
Mingtao Yang authored
Reviewed By: ouj Differential Revision: D7424982 fbshipit-source-id: 3190564d3e79d10d7d64c1822a53e058a201f87d
-
- 29 Mar, 2018 4 commits
-
-
Dave Watson authored
Summary: Remove hazptr_obj_batch feature. Not required after D7429494: After timer runs out, *all* thread caches are cleaned up, not just the current one, so it should be safe to push anything to local thread cache, even if thread isn't used often, as long as *some* thread is used. Reviewed By: magedm Differential Revision: D7433978 fbshipit-source-id: 01508fd199fcd267550efc08d2695b53f1569c84
-
Dave Watson authored
Summary: Continued reclamation issues from lots of UnboundedQueue batches, or lots of threads. In addition to the current number of outstanding objects, cleanup *all threads* on a timer basis. Reviewed By: magedm Differential Revision: D7429494 fbshipit-source-id: 7e9bdae9ae49927ca0b6e3f24963a4d4b23a4f0b
-
Boris Burkov authored
Summary: I would like to store a folly::Poly I'm defining in an ordered container (boost::containers::flat_set). While I could implement operator< for exactly my type, it seems nicer to add it as another interface all Poly users can reuse. Reviewed By: ericniebler Differential Revision: D7415861 fbshipit-source-id: 1912eaa009acea5c243db3e14fc0715a0829f251
-
Yedidya Feldblum authored
Summary: [Replaceable] Move `Replaceable` mixin param defaults to base template. Saves a few lines overall. Reviewed By: WillerZ Differential Revision: D7421561 fbshipit-source-id: f56d1ffdd081b0a8a20cb7a492f06c9647445782
-
- 28 Mar, 2018 7 commits
-
-
Erik Hortsch authored
Summary: This check is causing some issues in github commits. Figuring out exactly which versions of 4.9 have the bug is a pain, so let's just get rid of it. See D6695110 for more context. Reviewed By: yfeldblum Differential Revision: D7431713 fbshipit-source-id: 17d1b025edf52592495c5f69c5a15025b33b3895
-
Orvid King authored
Summary: Windows doesn't have a nice function to do this, so we have to do it ourself, throwing the right exception with a struct that no public header defines, because Windows. Reviewed By: akrieger Differential Revision: D5100900 fbshipit-source-id: 4f6840e50c5c1aef36adade098739201c97b9af7
-
Orvid King authored
Summary: Actually remove it. All uses of it (outside of thrift) were removed in the previous diff. Reviewed By: ot Differential Revision: D7422614 fbshipit-source-id: 6a59c34b3cbc0ee7c50f8cbf8c5e641352f2db1a
-
Joe Loser authored
Summary: There is a missing `#include <ostream>`. Add it. Closes https://github.com/facebook/folly/pull/807 Reviewed By: shixiao Differential Revision: D7425693 Pulled By: yfeldblum fbshipit-source-id: cb645f7da94ca5fe5f8d4314b99621557109f360
-
Jason Fried authored
Summary: Python is considered a Safe Enivronment, where things like aborts and segfaults can not happen. If clients where used outside of "async with" we use to print a error message and then C++ would abort. This fix makes sure C++ no longer aborts but we still print the message that the "async with" should be used. All futures are now shielded so cancel will not produce strange exceptions when C++ decides to fullfill the canceled future. Also we now pass a tuple of client and future to all bridgeFutureWith calls. This has the affect of making sure the client can not GC before the future is completed. We now use a unique_ptr for RequestChannel so there is no more race to delete the shared pointer. Reviewed By: yfeldblum Differential Revision: D7389380 fbshipit-source-id: 6a3ca019190907e726c550c9b379a2a2610d0b0a
-
Igor Sugak authored
Summary: `-Wextra-semi` became more strict. This fixes folly build with the latest clang. Reviewed By: yfeldblum Differential Revision: D7359992 fbshipit-source-id: ce7caf05aa536f35e9af4ed33a86072afd09f387
-
Xiao Shi authored
Summary: Revert changes accidentally slipped into D7405057. Reviewed By: yfeldblum, Orvid Differential Revision: D7419691 fbshipit-source-id: ab9bea3393eb33aa19b3009263a53ac91e30692c
-
- 27 Mar, 2018 5 commits
-
-
Dave Watson authored
Summary: folly::ThreadLocal already maintains this list for us. Add an accessor in folly::SingletonThreadLocal, and use it Reviewed By: yfeldblum Differential Revision: D7264843 fbshipit-source-id: 45278f7a074e50b96b451437c327de5d6713363a
-
Yedidya Feldblum authored
Summary: [Folly] Fix `retrying` when the policy throws. Differential Revision: D7392852 fbshipit-source-id: 3cb1d19697f111bf19047dc382056b39ad241035
-
Orvid King authored
Summary: Every compiler we currently support supports the `[[deprecated]]` attribute, so use that instead. Reviewed By: yfeldblum, ot Differential Revision: D7405895 fbshipit-source-id: 541c537cd7a0be0d901378c0e79f5cd0f55b85e3
-
Andrii Grynenko authored
Summary: Adding more details to the documentation and a unit test which checks various executors. Reviewed By: yfeldblum, djwatson Differential Revision: D7410461 fbshipit-source-id: 2ae6926f43862ec45a06ff76dbacae681fe6feaa
-
Andrii Grynenko authored
Reviewed By: wqfish Differential Revision: D7205067 fbshipit-source-id: 2236c132b2150e38da6d5a5c9970347320e19a60
-
- 26 Mar, 2018 5 commits
-
-
Dan Melnic authored
Summary: Fix "declaration of 'h' shadows a previous local [-Werror=shadow-compatible-local]" (Note: this ignores all push blocking failures!) Reviewed By: djwatson Differential Revision: D7406485 fbshipit-source-id: f23548022a3ccb1f480c7265b11c31d2e2876fd4
-
Orvid King authored
Summary: Due to a quirk in how MSVC does name resolution, if a default value is declared in the forward declaration of a template, and the definition is made available in the same unit, the default values in the forward declaration must use the names given in the definition, not the declaration. To keep it sane, just use the same template parameter names for both the declaration and definition. (Note: this ignores all push blocking failures!) Reviewed By: shixiao Differential Revision: D7405057 fbshipit-source-id: dda14043fec30fa505bb0bb3e2e31d0abb52ba1f
-
Xiao Shi authored
Summary: This diff adds a reverse iterator to F14VectorMap/Set; this is mainly useful because if there have been no calls to erase(), the reverse iterator will visit the entries in insertion order. Reviewed By: nbronson Differential Revision: D7173038 fbshipit-source-id: 0a64c4e753c9c36c6ac8b6141654b6f29f410580
-
Shoaib Meenai authored
Summary: The layout of an exception_ptr is determined by the ABI, not the OS. MinGW (and Cygwin, depending on the build settings) define `_WIN32` and would therefore have `kIsWindows` be true, but they use the Itanium ABI instead of Microsoft's, so we shouldn't take the MSVC codepath for them. Unfortunately, there isn't a reliable preprocessor method to determine the ABI being used. `_MSC_VER` can be defined even when using the Itanium ABI (e.g. when using windows-itanium triples with clang), and `_MSC_VER` can be undefined even when using the Microsoft ABI (e.g. when building with `-fno-ms-extensions` with clang). To address this, introduce `kMicrosoftAbiVer`, which defaults to `_MSC_VER`, but can be overridden manually if necessary. This should do the right thing by default most of the time, while providing an escape hatch for when `_MSC_VER` would be incorrect to use directly. Reviewed By: yfeldblum Differential Revision: D7377853 fbshipit-source-id: dd868370e9a496b98dd26dec77c4a75c49147c3c
-
Kevin Doherty authored
Summary: Currently, `collectN` attaches a callback to each input future. When the callback fires, it calls `emplace_back` on vector `ctx->v` with the result of the future. As the added unit test shows, this does not work if the futures are completed in parallel. See https://fb.facebook.com/groups/474291069286180/permalink/1838209692894304/ for more discussion. Reviewed By: yfeldblum Differential Revision: D7372982 fbshipit-source-id: 875eff19172bdbfb7d4f687911f4fa22061e4ed8
-
- 24 Mar, 2018 3 commits
-
-
Orvid King authored
Summary: `std::tuple` and `std::unordered_map` have long been standardized and supported by every platform we care about. Beyond that MSVC is starting to remove the tr1 namespace entirely, so these references don't work under the newest MSVC. Reviewed By: yfeldblum Differential Revision: D7389783 fbshipit-source-id: c089490360ebf15ac23925f71e991602fda3d7a0
-
Orvid King authored
Summary: The nightlies for MSVC included support for std::launder, but the version that released with VS2017.7 Preview 2 doesn't actually support it. The version included in the preview also adds a macro to detect if it's been enabled, so use that. Reviewed By: yfeldblum Differential Revision: D7388311 fbshipit-source-id: 197230c9947cb271d6107d0cd5e905643e5589d1
-
Orvid King authored
Summary: MSVC moves faster than boost updates, so it's not unusual to be building with an MSVC newer than the boost being used was able to be tested against. This causes Boost to emit a message at compile time for every compilation unit it is included in. Luckly, boost provides a way out of the message, so add a config option to do so and enable it by default. Reviewed By: yfeldblum Differential Revision: D7388583 fbshipit-source-id: 8ecddc048df432df5200f4601e4121bdbd275220
-
- 23 Mar, 2018 10 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Use C++ `thread_local` for fast-path cache in `SingletonThreadLocal`. Because modules might be `dlclose`'d, use `static thread_local` rather than `static __thread` in the slow path which integrates the dtor into both `dlclose` and thread exit. Because there might be multiple dynamically-loaded modules where the `static __thread` caches cannot be merged into a single cache, let all caches be tracked in a list. We have not found a case where this can happen while at the same time the `StaticSingletonManager` singleton does get merged, but this is at least not strictly wrong. Reviewed By: djwatson Differential Revision: D7316155 fbshipit-source-id: 0bf06638853ed70464856853349445d9fa6eabc0
-
Mainak Mandal authored
Summary: Currently, initializing a `ThreadLocal` with 0 silently passes and then fails at a later stage making it very hard to debug what went wrong Reviewed By: yfeldblum Differential Revision: D7326627 fbshipit-source-id: dab62166753168e292f67938c52f82a1b610be2a
-
Igor Sugak authored
Summary: Latest clang reported `-Wextra-semi` in `BOOST_MPL_HAS_XXX_TRAIT_DEF` uses with the trailing `;`. Codemod them away before the upgrade. ```lang=bash fbgr -sl 'BOOST_MPL_HAS_XXX_TRAIT_DEF\(.*\);$' | xargs perl -pi -e 's,(BOOST_MPL_HAS_XXX_TRAIT_DEF\(.*\));$,\1,' ``` Reviewed By: yfeldblum Differential Revision: D7383619 fbshipit-source-id: f7f9415617cf6d4a876ebe8bf782d0115cd01c23
-
yuyoyuppe authored
Summary: Compilation of basic sample from doc using VS2017 currently fails with: ``` C2327 'folly::ProducerConsumerQueue<folly::fbstring>::writeIndex_': is not a type name, static, or enumerator ``` Fixed it and updated the docs. Closes https://github.com/facebook/folly/pull/806 Reviewed By: akrieger Differential Revision: D7379931 Pulled By: yfeldblum fbshipit-source-id: 6b7a72abd3324af56de355a6e65bdc7e1195596d
-
Igor Sugak authored
Summary: Macro BENCHMARK_DRAW_LINE can be used as the following: ```lang=bash BENCHMARK_DRAW_LINE() BENCHMARK_DRAW_LINE(); ``` This inconsistency was detected by `-Wextra-semi` in the latest clang. This diff removes the trailing `;` inside `BENCHMARK_DRAW_LINE` and updates all of the references. ```lang=bash fbgr -sl 'BENCHMARK_DRAW_LINE\(\)' | xargs perl -pi -e 's,(?<!#define )BENCHMARK_DRAW_LINE\(\)(?!;),BENCHMARK_DRAW_LINE\(\);,' ``` Reviewed By: yfeldblum Differential Revision: D7382525 fbshipit-source-id: 76f1da01bb4dde1b0fa4ebf98748d001d8e04ab0
-
Aaryaman Sagar authored
Summary: As title Reviewed By: yfeldblum Differential Revision: D7379148 fbshipit-source-id: 6865940adee5899a055e1dac6b23705db2bc8ed7
-
Xiao Shi authored
Summary: `iterator F14VectorMap::erase(const_iterator, const_iterator)` was missing a conversion from `const_iterator` to `iterator`. This diff adds it as well as a test. For sets, `iterator == const_iterator` so no need for anything special. Perhaps we could save the roundtrip from iterator space to index space and back using some const_cast of fancy pointers? The cost is going to be amortized anyway... Reviewed By: nbronson Differential Revision: D7373152 fbshipit-source-id: 91f651b3e4a1314c68fb8809baeb1477f8881790
-
Yedidya Feldblum authored
Summary: [Folly] Gate `hazptr` `static_assert` on `_CPPLIB_VER` vs `_MSC_VER`. It's a property of the standard library implementation, not a property of the compiler front-end. Reviewed By: smeenai, Orvid Differential Revision: D7378222 fbshipit-source-id: 78d04252df751b683c0099cb0c273302ff388b73
-
Shoaib Meenai authored
Summary: It's easy enough to calculate the right offset for both 32 and 64-bit platforms, so we can just do so instead of hardcoding the 64-bit offset. Reviewed By: yfeldblum, Orvid Differential Revision: D7377039 fbshipit-source-id: 5f7efbae58b7694801274e195a97b5e5b62b5a5e
-
John Strizich authored
Summary: in response to https://github.com/facebook/openr/issues/23 Reviewed By: snarkmaster Differential Revision: D7342371 fbshipit-source-id: 15737f79900722ce016494f994932aa26e5acad5
-
- 22 Mar, 2018 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Enable `-Wshadow` for clang and gcc >= 5. And disable it globally for gcc < 5 (sorry, but not sorry). The gcc < 5 implementation is far too restrictive. Reviewed By: meyering Differential Revision: D7320760 fbshipit-source-id: 49cc971afcacc92b0bb2d9c4b2d7b04405fb95b3
-