- 21 Nov, 2018 5 commits
-
-
Adam Simpkins authored
Summary: Eliminate the custom PlatformConfig.h header that could be included by defining `FOLLY_PLATFORM_CONFIG` with a command line compiler flag. This separate header was only used to control one setting (`FOLLY_HAVE_PIPE2`), and can easily be done in the normal `folly-config.h` header. Including this file with a compiler command-line macro made it not behave nicely when using clang modules. Reviewed By: andrewjcg, yfeldblum Differential Revision: D13151079 fbshipit-source-id: ae3cc98b7494d409d87bc3e47d740d844c42a940
-
Andrii Grynenko authored
Summary: This is useful for unit tests which need to wait for observer updates. Reviewed By: yfeldblum Differential Revision: D13133404 fbshipit-source-id: ff36f55ec537490a763865cea2125617b58dc9c0
-
Mark Santaniello authored
Summary: Defer evaluation so that conversion operator value_type can be incomplete. Reviewed By: yfeldblum, nbronson Differential Revision: D13123972 fbshipit-source-id: b53431232d20b2962530ad9ad81ed12acb5d7208
-
Maged Michael authored
Summary: Completes the previous change to disable destruction order guarantee for keys and values to give some higher-level users of ConcurrentHashMap time to adapt to the destruction order guarantee. To reenable the destruction order guarantee, uncomment the two calls to set_batch_tag that were commented out in this and the previous change. Reviewed By: davidtgoldblatt Differential Revision: D13141742 fbshipit-source-id: c49ad5b0a0f82da7b36e0fea294425ec2b681ab9
-
Yedidya Feldblum authored
Summary: [Folly] Implicitly default the `SharedPromise` ctors, assigns, dtor. If the default implementations are correct, then they are easier to maintain over time. Has the effect of removing thread-safety from the move-assign operator. Which is quite alright - copy-assignment and move-assignment operators being thread-safe is weird. Reviewed By: davidtgoldblatt Differential Revision: D13131063 fbshipit-source-id: 2be67b06d2a65867dc8ebbd7364b74a9cd1c2a20
-
- 20 Nov, 2018 2 commits
-
-
Maged Michael authored
Summary: Temporarily disable the use of hazptr_obj_batch until higher-level users adapt to the destruction order policy of completing the destruction of keys and values by the completion of ConcurrentHashMap destructor. Reviewed By: yfeldblum Differential Revision: D13136251 fbshipit-source-id: ee2ed21d1825d2609d8f097e878457975d7909e8
-
Lee Howes authored
Summary: Future::then taking a value-taking function is deprecated and being deleted. This cleans up a few more callsites. Reviewed By: yfeldblum, Orvid Differential Revision: D13116186 fbshipit-source-id: 9586029a4fa70b438e6cf09861842a5b585da2c5
-
- 19 Nov, 2018 2 commits
-
-
Orvid King authored
Summary: Just do this atomically as there's only 2 places that use this. Reviewed By: yfeldblum Differential Revision: D13104245 fbshipit-source-id: ca3c5271deaade071e5e497bde5eeb15d5513e59
-
Maged Michael authored
Summary: Use hazptr_batch and tagged objects for buckets and nodes. After this diff, higher-level users no longer need to call hazptr_cleanup. CHM destructor guarantees the destruction of all key and value objects that were in this instance of CHM. Reviewed By: djwatson Differential Revision: D10150474 fbshipit-source-id: 99530971d157ce4ca0bb0a983b3f7eb40666885e
-
- 18 Nov, 2018 6 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Remove unused template param defaults in `LockFreeRingBuffer`. Differential Revision: D13113827 fbshipit-source-id: 9400853cde60b8bc227383b2a0ab1efb95786d87
-
Yedidya Feldblum authored
Summary: [Folly] Defer all initialization until allocation in `IndexedMemPool`. This provides a better guarantee that the constructor never dirties the allocated region by accidentally direct-initializing rather than default-initializing the linked list pointers in the mapped region. Reviewed By: davidtgoldblatt Differential Revision: D13046558 fbshipit-source-id: 1bde547525e2502607d01e68206d7f8c826baebd
-
Lee Howes authored
Summary: Remove uses of folly::Future::then(task-taking-value) from folly and replace with thenValue. Reviewed By: yfeldblum Differential Revision: D13115197 fbshipit-source-id: 3843ec2412a0dfc0c2ee7940ff7e17320215ff72
-
Yedidya Feldblum authored
Summary: [Folly] `invoke_cold`, `catch_exception`. These may be used to facilitate preprocessor-free-at-call-site `try`-and-`catch` in library code when compiling with `-fno-exceptions`. Reviewed By: swolchok Differential Revision: D13020421 fbshipit-source-id: d9d7998e00eed6ced943ea73b648fa0b7cabd831
-
Aaryaman Sagar authored
Summary: Removes the inline asm from PicoSpinLock and uses the fetch_set and fetch_reset utilities instead Reviewed By: yfeldblum Differential Revision: D9697136 fbshipit-source-id: 022bb2d2d9d7cd6ac8a0011bff4c8995db989950
-
Orvid King authored
Summary: It's no longer needed Reviewed By: yfeldblum Differential Revision: D13105079 fbshipit-source-id: d9d1ea7cc11380ea0d17cfee6055e113b888e465
-
- 17 Nov, 2018 12 commits
-
-
Orvid King authored
Summary: Do the thing Reviewed By: yfeldblum Differential Revision: D13095592 fbshipit-source-id: 372d1e50e7456ab56ac8c56cb8c9a7b316d2976f
-
Orvid King authored
Summary: It's no longer needed Reviewed By: yfeldblum Differential Revision: D13104830 fbshipit-source-id: 70e633d0a99740824e574e7976882648534bfa12
-
Orvid King authored
Summary: It's no longer needed. Reviewed By: yfeldblum Differential Revision: D13105173 fbshipit-source-id: 2c1cf79af29a112fbe85d55aa3b180e7f783850c
-
Perry Randall authored
Differential Revision: D13113756 Original commit changeset: a40f43280e5f fbshipit-source-id: 2025c86639ddefa0c254ea7a6f2c5305e71754ee
-
Aaryaman Sagar authored
Summary: Add better coverage for fairness benchamrks to SmallLocksBenchmark, in particular add fairness numbers for 2, 4, 8, 16, 32 and 64 threads Reviewed By: yfeldblum Differential Revision: D13052111 fbshipit-source-id: 9b470ebba377734d27624ab35ece2f5e70116485
-
Orvid King authored
Summary: Also nuke the second argument, as it's always nullptr. Reviewed By: yfeldblum Differential Revision: D13104960 fbshipit-source-id: 34d6cfd227d1b4ce2d73de1cc5ec211ec28c869b
-
Orvid King authored
Summary: It is no longer needed Reviewed By: yfeldblum Differential Revision: D13095360 fbshipit-source-id: 590b5483be9c14e2c8e8c06136f12de3c582368d
-
Orvid King authored
Summary: This means removing it's file-descriptor variants. Reviewed By: yfeldblum Differential Revision: D13104563 fbshipit-source-id: 769aa050f08d3fa57c71aa4e8064cf1dc711cf80
-
Yedidya Feldblum authored
Summary: [Folly] Tweak createGlobal: use a local struct and padd a general callable. Reviewed By: andrewjcg Differential Revision: D13113756 fbshipit-source-id: a40f43280e5f83f08963c7ecedcb82fab65c95b4
-
Andrew Gallagher authored
Summary: (Note: this ignores all push blocking failures!) Differential Revision: D13113896 fbshipit-source-id: aefac5744e0f2e2f5ab27753de4662234a0e0de6
-
Andrew Gallagher authored
Summary: - Don't use rule-private `*-inl.h` headers outside of rule. - Don't `#include` headers inside of namespaces. - Add missing `#include`s. Reviewed By: yfeldblum Differential Revision: D13056548 fbshipit-source-id: 9fb01be3e705cf107bdb55de3bd92300bc4bfec5
-
Orvid King authored
Summary: It's no longer needed Reviewed By: yfeldblum Differential Revision: D13106461 fbshipit-source-id: fcd194a2815581e2f8e2e181019d67a088f8788a
-
- 16 Nov, 2018 3 commits
-
-
Maged Michael authored
Summary: Use hazptr_obj_batch to ensure that interrelated retired segments are checked together against hazard pointers. Reviewed By: djwatson Differential Revision: D10148259 fbshipit-source-id: eeaa127d808c68fcd12d7dd8ef25a4fdb870084f
-
Andrew Gallagher authored
Summary: Passing a lambda to `create` causes "definition with same mangled name as another definition" errors (similar to https://bugs.llvm.org/show_bug.cgi?id=33924). Reviewed By: pixelb Differential Revision: D13056795 fbshipit-source-id: ef87ecc79a6a3caef73ea4d366dc3c93773ac9ab
-
Andrew Gallagher authored
Summary: Fix missing deps and includes exposed by modular builds. Reviewed By: yfeldblum, ericniebler, kirkshoop Differential Revision: D13056616 fbshipit-source-id: 038b539121489c0e7e08d27b7911592157e20ecf
-
- 15 Nov, 2018 5 commits
-
-
Andrew Gallagher authored
Summary: Use of `auto` as a return type of a class member function is causing clang module build errors. I've yet to completely reduce this issue and file an upstream bug report. This diff works around it for now by using `decltype`. Reviewed By: kirkshoop Differential Revision: D13056670 fbshipit-source-id: cffaa2ff347429935bd2c8ef9044339eed946b0f
-
Dan Melnic authored
Summary: LockFreeRingBuffer: allow writing different data types Reviewed By: djwatson Differential Revision: D13066863 fbshipit-source-id: 7963e3da6daa9d1eff80e7642f0b6c773acc4856
-
Orvid King authored
Summary: We have the ability to support this rather odd combination of flags, so do it. Reviewed By: yfeldblum Differential Revision: D13067516 fbshipit-source-id: b0006a995ef614253440820e029f66288b557c37
-
Andrew Gallagher authored
Summary: Named namespaces inside unnamed namespaces conflict when they cross module boundaries (https://bugs.llvm.org/show_bug.cgi?id=39644). Reviewed By: yfeldblum Differential Revision: D13056637 fbshipit-source-id: 2ecf2360bbb3b6e7a3cf72ca20e38d7b940e694a
-
Andrew Gallagher authored
Summary: This is meant to be included by other rules, so don't use the `-inl.h` suffix which is reserved for rule-private headers. Reviewed By: yfeldblum Differential Revision: D13056539 fbshipit-source-id: 5c36d4473f041f5e8dea9458fc12f71e1e9ac613
-
- 14 Nov, 2018 5 commits
-
-
Maged Michael authored
Summary: Add batches and tags for objects protectable by hazard pointers. Add fine-grained cleanup of tagged objects (lower overhead than calling hazptr_cleanup). Design sketch: - The domain structure contains an untagged list and one or more tagged lists (more than one to reduce contention). - These domain lists support lock-free push and lock-free unlocked pop all. Tagged lists are locked by pop all operations and unlocked by push_unlock operations. Push operations are lock-free even when a list is locked for pop all operations. - Batches are lists of retired objects. - Each object contains the address of a batch (or null). The lowest bit indicates if the batch address is used also as a tag. - hazptr_cleanup_batch_tag(tag) reclaims all objects with that tag without checking hazard pointers. - All objects in a domain tagged list contain tagged objects that hash to the index of the list. - Untagged object are those that are safe to reclaim at shutdown time, i.e., their deleter only reclaims memory without other dependencies. - For example, retired UnboundedQueue segments do not depend on user-defined destructors and their deleters merely reclaim memory using the default deleter, and therefore can be untagged. - On the other hand, the deleters of ConcurrentHashMap buckets and nodes depend on user-defined code and therefore their destruction must be managed explicitly. Therefore they are tagged. - Batches can be used even without tagging. For example retired UnboundedQueue segments are collected in batches because they have link-counting interdependencies and batches help keep related segments together. Reviewed By: davidtgoldblatt Differential Revision: D10147101 fbshipit-source-id: 8820cf46ad8942c7362d91543bfbd9fe07e27b7a
-
Mingtao Yang authored
Summary: SSLContext::loadCertificate() loads a certificate chain with SSL_CTX_use_certificate_chain_file. A method named SSLContext::loadCertificateFromBufferPEM() should have the same semantics. Reviewed By: yfeldblum Differential Revision: D13037752 fbshipit-source-id: da7b150065d2207421c6bba86d44ce5e2c57e1a9
-
Lee Howes authored
Summary: Splits folly::futures::map over forms that take value continuations and try continuations. This allows the implementation to call Future::thenValue and Future::thenTry correctly. Reviewed By: yfeldblum Differential Revision: D10861465 fbshipit-source-id: 31044127f43e574edcc01c6bb173ecc4f0c9c90e
-
Yiding Jia authored
Summary: Avoid create StringViewType if value_type is not POD, as with libc++ there is a static_assert in the class body which seems to fail. Reviewed By: yfeldblum Differential Revision: D13015696 fbshipit-source-id: 090e5cd3f5e21aa8c22ea893e894b38fd3d2a745
-
Andrew Gallagher authored
Reviewed By: yfeldblum Differential Revision: D13056552 fbshipit-source-id: 910296cda7d392972a48c8fa3e425b4bdeaa5d26
-