- 26 Dec, 2017 8 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Tweaks to `AtomicStruct`. Reviewed By: Orvid Differential Revision: D6636432 fbshipit-source-id: 274c118a732287219c569d7d3f4e170f275518f1
-
Lee Howes authored
Summary: Returning a SemiFuture from a continuation should work by correctly checking the types and returning a folly::Future on the same executor as the original future that .then was applied to. Reviewed By: yfeldblum Differential Revision: D6597273 fbshipit-source-id: cf2016a344d4b29f1d31c1da20c89df5b4cfe64e
-
Yedidya Feldblum authored
Summary: [Folly] Remove `folly/detail/UncaughtExceptionCounter.h`. It's a thin and unnecessary shell around `folly/UncaughtExceptions.h`. Reviewed By: Orvid Differential Revision: D6636260 fbshipit-source-id: cdf6fa5fefc9fd69586c1c4c1a8443c5e8543b1c
-
Yedidya Feldblum authored
Summary: [Folly] `constexpr_log2_ceil`, like `constexpr_log2` but rounding up. Reviewed By: Orvid Differential Revision: D6636433 fbshipit-source-id: a10f031cc9c91cfeba7b74bbf143895a311ca772
-
Yedidya Feldblum authored
Summary: [Folly] Move `folly/detail/Sleeper.h` to `folly/synchronization/detail/`. Reviewed By: Orvid Differential Revision: D6636459 fbshipit-source-id: e0b37459fe721c96837b653e652c1bc6bfeb5dce
-
Gabriel Wicke authored
Summary: Window tests were moved to a separate file. Update the README to the new location. Reviewed By: yfeldblum Differential Revision: D6636178 fbshipit-source-id: 0313dfe80de7686e1e530ed9eb4bbcefb459633c
-
Yedidya Feldblum authored
Summary: [Folly] Format `digits10`. Reviewed By: Orvid Differential Revision: D6636190 fbshipit-source-id: 6e6b834f6c9070d58f8e2b085b09df8b857fe878
-
Yedidya Feldblum authored
Summary: [Folly] Move `folly/AtomicStruct.h` to `folly/synchronization/`. Reviewed By: Orvid Differential Revision: D6636072 fbshipit-source-id: 87098e25fc40d0d60b4a657ba395418388e170fc
-
- 25 Dec, 2017 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Remove unused `boost` dep from `Conv.h`. Reviewed By: Orvid Differential Revision: D6636040 fbshipit-source-id: 77dbfcf95f68c05346bce52d1a965e465c2efe3b
-
- 24 Dec, 2017 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Update homebrew script to use gtest 1.8.0, to be consistent with the docs. Closes #722. Reviewed By: Orvid Differential Revision: D6633606 fbshipit-source-id: 5e9a5790100fe7a408be7a9a77c847bece91d405
-
- 23 Dec, 2017 3 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Move expensive `Singleton` code to `.cpp`. Including string manipulation, `ostream::operator<<` operations, `throw` statements, etc, Reviewed By: ot Differential Revision: D6632052 fbshipit-source-id: 82e0033d5042b02951cf3b05c55cf62c97cc2b6d
-
Lee Howes authored
Summary: Also deprecates folly::getFuture function. Reviewed By: yfeldblum Differential Revision: D6594299 fbshipit-source-id: 67435f35dca660da049cd8c505ee9a21424c0d2b
-
Yedidya Feldblum authored
Summary: [Folly] Namespace portability symbols better in `Singleton.cpp`. Reviewed By: Orvid Differential Revision: D6631290 fbshipit-source-id: eb802ace6a9bf704e011eb44710922c997a9cd8e
-
- 22 Dec, 2017 2 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Fix the assumption in the `propagate_const` test about local layout. Reviewed By: aary Differential Revision: D6624962 fbshipit-source-id: 6871dc20f2b5ec2d1a86f520030c7cda8a225958
-
Aaryaman Sagar authored
Summary: As title Reviewed By: yfeldblum Differential Revision: D6620395 fbshipit-source-id: 477aae84b2bbde2e79d46ae93c285909b56f575e
-
- 21 Dec, 2017 1 commit
-
-
Andrii Nakryiko authored
Summary: There are cases where ELF binaries are running fine, but have slightly corrupted ELF headers, e.g., with section headers offset pointing beyond boundaries of file. I'm guessing this is due to running strip or objdump with either some particular combination of flags or some due to buggy version of those tools. This change prevents from crashing on such files. Reviewed By: yfeldblum Differential Revision: D6616027 fbshipit-source-id: 8cb3ac4475a51d1f1045c395977a6a77fbefffb2
-
- 20 Dec, 2017 6 commits
-
-
Chad Austin authored
Summary: It was not clear to me, if a callback takes no arguments, the underlying value is guaranteed to be alive during the execution of the callback, so I wrote these tests. Reviewed By: yfeldblum Differential Revision: D6594921 fbshipit-source-id: 6a658afc1bf4d29eaa9c62269ddc21c7f897ad01
-
Yedidya Feldblum authored
Summary: [Folly] Kill `FOLLY_ALIGNED` etc. `alignas` is standardized as of C++11. Let us just use that. Replace: * `FOLLY_ALIGNED` with `alignas` * `FOLLY_ALIGNED_MAX` with `alignas(folly::max_align_v)` * `FOLLY_ALIGN_TO_AVOID_FALSE_SHARING` with `alignas(folly::hardware_destructive_interference_size)` Because where `alignas` may be placed is more restrictive than where attributes may be placed, we also need to move these directives in some cases on top of doing the replacement. Reviewed By: Orvid Differential Revision: D6555167 fbshipit-source-id: 4b05b570bace3f8c0fe810b6dd58781dd45757f4
-
Yedidya Feldblum authored
Summary: [Folly] Fix Build: `propagate_const` under GCC. Reviewed By: aary Differential Revision: D6609722 fbshipit-source-id: 47d8b0f2d54e0e5834383ea64c93af30927c921d
-
Zheng Yan authored
Summary: Add readWithPriority to PriorityMPMCQueue Reviewed By: yfeldblum Differential Revision: D6606604 fbshipit-source-id: 07382e3c6d0f53a8727c059410c0577cf0aac82c
-
Yedidya Feldblum authored
Summary: [Folly] Add `hardware_destructive_interference_size` and `hardware_constructive_interference_size` to `folly/lang/Align.h`. As backports from C++17. Which may require keeping, depending on how stanard libraries choose to implement these. And replace `CacheLocality::kFalseSharingRange` with `hardware_destructive_interference_size`. Reviewed By: ot Differential Revision: D6554817 fbshipit-source-id: bff49f5ca8b01d38fa806076f99201355df76cd9
-
Yedidya Feldblum authored
Summary: [Folly] `propagate_const`, backported from C++ Library Fundamentals TS v2. Reviewed By: ericniebler Differential Revision: D6589681 fbshipit-source-id: cdc8981d17938b99afe60e2baefff7deb5316612
-
- 19 Dec, 2017 5 commits
-
-
Dave Watson authored
Summary: Previously D6579707. Correctly advance to next item if we erase the current element. Corner cases were slightly off if we were at the end of a hash chain. Reviewed By: yfeldblum Differential Revision: D6603518 fbshipit-source-id: acb959e5bcd5da1c3df642b75985d464fdd3b23d
-
Dave Watson authored
Summary: I misread the ThreadLocal docs, thread destruction functions do *not* grab the accessAllTHreads_ lock unless you use *strict* mode, and even then, it is only a read lock. Easy enough to make the thread-destruction global bits to be atomic / use folly::Synchronized. Reviewed By: yfeldblum Differential Revision: D6592905 fbshipit-source-id: 4ae600dff4c8c04751483a452ca7c07ef3f26380
-
Yedidya Feldblum authored
Summary: [Folly] Switch the `Baton` template params for consistency with `SaturatingSemaphore`. Reviewed By: davidtgoldblatt Differential Revision: D6591060 fbshipit-source-id: 44d6243d3185d95364a27e497216cc02fb3bc2e8
-
Dustin Pho authored
Summary: Adding secure RNG utility functions (rand32, rand64, oneIn, randDouble01, randDouble). Reviewed By: yfeldblum Differential Revision: D6551975 fbshipit-source-id: 720d138de1329669b1a15eb3e9cb3fe91ce982a4
-
Yedidya Feldblum authored
Summary: [Folly] `Baton::ready`, a `const` variant of `try_wait`. Reviewed By: djwatson Differential Revision: D6508064 fbshipit-source-id: ba458577574ba58165408a93238da7eb09adf1e6
-
- 18 Dec, 2017 2 commits
-
-
Giuseppe Ottaviano authored
Summary: The `get*Executor()` APIs don't check whether the singletons haven't been destroyed already. Add a check and allow to return `nullptr` during shutdown. Also do a general clean up of the code, there was no reason to use three independent singletons (non-atomically destroyed) for each executor. Reviewed By: philippv, luciang Differential Revision: D6589486 fbshipit-source-id: 20fb835db7e446bd811bbd6d5ddbc41db9e98b54
-
Christopher Dykes authored
Summary: The shim existed so that hhvm-third-party could be updated, and it has been, so it's time to remove the shim. Reviewed By: yfeldblum Differential Revision: D6590439 fbshipit-source-id: 3e1b039c1df6cf1e74102f7b7b26aa90fae31ec0
-
- 17 Dec, 2017 1 commit
-
-
Maged Michael authored
Summary: Test UnboundedBlockingQueue for the case in D3527722 Reviewed By: ot Differential Revision: D6587163 fbshipit-source-id: 1465991018187c5f841e6e3e7a11676390e2f8f2
-
- 16 Dec, 2017 5 commits
-
-
Maged Michael authored
Summary: The current semantics of try_dequeue variants can cause problems in cases where based on external dependencies the consumer is guaranteed that the queue is not empty and depends on the success of try_dequeue. See https://github.com/facebook/wangle/commit/abd07a06cae09efcd4347a9a019d59ae8a013c3f This diff changes the semantics so that try_dequeue operations fail only if the queue is empty. Reviewed By: yfeldblum Differential Revision: D6586156 fbshipit-source-id: 25d6085e28d3e24034ecf6a8bafab51c95464b01
-
Maged Michael authored
Summary: Without the fix multiple consumers may update head concurrently and cause it to lag. If this persists until the destruction time of the queue, some segments may be incorrectly retired twice. The fix is to wait for head to advance to the current segment first before advancing head to the next segment. Reviewed By: djwatson Differential Revision: D6588135 fbshipit-source-id: 3e916441bff5ad3f27de418601990c59a0b89bc2
-
Yedidya Feldblum authored
Summary: [Folly] Group the fields of `UnboundedQueue`. Into helper structures which are organized by, and aligned by, access. This is all compiled away and has no runtime cost. Reviewed By: magedm Differential Revision: D6555031 fbshipit-source-id: 94424747bf76a0a9a2bd59b6a94749efb391d6a7
-
Maged Michael authored
Summary: Fix typos and wording in comments. Reviewed By: yfeldblum Differential Revision: D6584559 fbshipit-source-id: b4b72f6c25c9f9e6fb3f2fbee69eea4a39b5c004
-
Yanbo Xu authored
Summary: This reverts commit a45f47a53e106d22daa9cf57be6c40c4f6a430d9 bypass-lint Differential Revision: D6579707 fbshipit-source-id: 6f6c35de5e05f8cf37491471e1ae1272290fe61b
-
- 15 Dec, 2017 5 commits
-
-
Keith Daigle authored
Summary: Found that building folly on aarch64 gave errors with picospinlock. Looked and found that MSVC used casts so I figured I'd try that Reviewed By: yfeldblum Differential Revision: D6504689 fbshipit-source-id: 9565bae5ffab485da407b8609be92ef7db10ab72
-
Yanbo Xu authored
Summary: The iterator returned from erase api could skip nodes. The fix is to initialize the returned iterator with right value. Reviewed By: djwatson Differential Revision: D6579707 fbshipit-source-id: a45f47a53e106d22daa9cf57be6c40c4f6a430d9
-
Yedidya Feldblum authored
Summary: [Folly] Fix `folly::max_align_v` for Clang on ARMv7. There is some problem with computing the correct result of `alignof` for a compound `union` POD type, because why wouldn't there be. The result *should* just be the max of the `alignof` of the type of each field if each field is default aligned - but not on some platforms! So we must compute the max directly. Reviewed By: mzlee, Orvid Differential Revision: D6573548 fbshipit-source-id: 512a255fda64795104d71fde14372befa3bf41e4
-
Yedidya Feldblum authored
Summary: [Folly] Let `Baton` methods be `noexcept`. Reviewed By: djwatson Differential Revision: D6508057 fbshipit-source-id: 2138a228d8291e79e9368cb77b0f63f4412524dc
-
Dan Melnic authored
Summary: We currently leak ptr entries due to a missing map erase call in AsyncSocket::releaseZeroCopyBuf. Also addZeroCopyBuf called when the bytesWritten == 0 will cause and extra id to be allocated. This will delay the deletion of the last IOBuf sent via zerocopy. The number of buffers can accumulate over time if the same bytesWritten == 0 situation is encountered. Found when running the nbd-server zero downtime upgrade during heavy fio traffic. Add an AsyncSocket::processZeroCopyWriteInProgress so we can drain the zerocopy msg error queue even after we set the ReadCallback to nullptr. Reviewed By: djwatson Differential Revision: D6552982 fbshipit-source-id: 3d2fdca84ec3b5fc46c3bed06c0c9ede66ed565a
-