1. 16 Nov, 2019 1 commit
  2. 15 Nov, 2019 6 commits
    • generatedunixname89002005287564's avatar
      Remove dead includes in folly/executors · 789882d5
      generatedunixname89002005287564 authored
      Reviewed By: yfeldblum
      
      Differential Revision: D18528940
      
      fbshipit-source-id: 288abb510535540698416ac046c1057e110e4478
      789882d5
    • Yedidya Feldblum's avatar
      Erase the invokers · 02fb0302
      Yedidya Feldblum authored
      Summary: [Folly] Erase the invokers. A catchy title, but forcibly inline the invoker call operators.
      
      Reviewed By: vitaut
      
      Differential Revision: D18035184
      
      fbshipit-source-id: 5cf57d785523904a5260f7ed24c9ed34148370eb
      02fb0302
    • Yedidya Feldblum's avatar
      Fix possible segv in Function shared proxy · 1bb7c1fb
      Yedidya Feldblum authored
      Summary:
      [Folly] Fix possible segv in `Function` shared proxy when invoking the (public!) `nullptr`-taking ctor.
      
      This proxy is used when converting `folly::Function` to `std::function` with shared state.
      
      Reviewed By: ot
      
      Differential Revision: D18517365
      
      fbshipit-source-id: c414c1d1ae2b4f30ffa3269b216be07fedbf838c
      1bb7c1fb
    • Yedidya Feldblum's avatar
      Avoid overloading other names from within detail namespaces · c9bd77f1
      Yedidya Feldblum authored
      Summary: [Folly] Avoid overloading other names from within detail namespaces - prefer renaming or at least mangling.
      
      Reviewed By: Orvid
      
      Differential Revision: D18502700
      
      fbshipit-source-id: a4f455db69396962b298c6291929f1eb152e1576
      c9bd77f1
    • Rosen Penev's avatar
      Asm: pause under MIPS as well (#1257) · 6f5a64d6
      Rosen Penev authored
      Summary:
      The instruction is identical to the x86 one. First introduced in MIPS32r2.
      Signed-off-by: default avatarRosen Penev <rosenp@gmail.com>
      Pull Request resolved: https://github.com/facebook/folly/pull/1257
      
      Reviewed By: Orvid
      
      Differential Revision: D18467031
      
      Pulled By: yfeldblum
      
      fbshipit-source-id: 04b695167184db8ef71df47e82e414793ddb0ab9
      6f5a64d6
    • Yedidya Feldblum's avatar
      FOLLY_CREATE_FREE_INVOKER, FOLLY_CREATE_MEMBER_INVOKER · 808c845b
      Yedidya Feldblum authored
      Summary:
      [Folly] `FOLLY_CREATE_FREE_INVOKER` and `FOLLY_CREATE_MEMBER_INVOKER` to replace `FOLLY_CREATE_FREE_INVOKE_TRAITS` and `FOLLY_CREATE_MEMBER_INVOKE_TRAITS`.
      
      New approach: just emit an invoker object. For the traits, just use the normal traits instead of rewriting them, or use `invoke_traits` to get an invoke-traits type specialized to the invoker.
      
      Reviewed By: vitaut
      
      Differential Revision: D18079121
      
      fbshipit-source-id: 8258c36b8ba6ee62a8ecc104cd1b6281d313960f
      808c845b
  3. 14 Nov, 2019 4 commits
    • Rosen Penev's avatar
      Use auto where appropriate (#1256) · 3de8f357
      Rosen Penev authored
      Summary:
      Found with modernize-use-auto
      Signed-off-by: default avatarRosen Penev <rosenp@gmail.com>
      Pull Request resolved: https://github.com/facebook/folly/pull/1256
      
      Reviewed By: Orvid
      
      Differential Revision: D18421629
      
      Pulled By: yfeldblum
      
      fbshipit-source-id: c49418a3b3413acd1506c550af44c806332eedb8
      3de8f357
    • Maged Michael's avatar
      hazptr: Support obj batch bypass to domain · 99b49e47
      Maged Michael authored
      Summary:
      This diff adds support for optionally setting an obj batch such that objects retired to the batch bypass the batch and are directly pushed to the domain.
      This is useful in cases where the benefits of earlier reclamation outweigh the benefits of amortizing the cost of pushing objects to the domain.
      
      Reviewed By: davidtgoldblatt
      
      Differential Revision: D18114444
      
      fbshipit-source-id: a1af88dfa1b601827b2f71e700fb1dfcb08e513c
      99b49e47
    • Dan Melnic's avatar
      Fix -Wshorten-64-to-32 compile warning treated as error · c31d1330
      Dan Melnic authored
      Summary:
      Fix -Wshorten-64-to-32 compile warning treated as error
      
      (Note: this ignores all push blocking failures!)
      
      Reviewed By: nbronson
      
      Differential Revision: D18493255
      
      fbshipit-source-id: 10a2a576c7f587d02a61860285171f2c5f0534ad
      c31d1330
    • Phil Willoughby's avatar
      add a message propagation barrier · cd7a67ad
      Phil Willoughby authored
      Summary:
      Allows a category to be configured to selectively propagate messages to its parent category.
      
      I preferred this over a simple `true`/`false` filter because it can be useful to have one log file for all DBG logs from a component while still limiting it to `INFO` or whatever in the main application log file.
      
      Reviewed By: simpkins
      
      Differential Revision: D18360804
      
      fbshipit-source-id: a45098c81fdc8b984e440748880e8943df95acd2
      cd7a67ad
  4. 13 Nov, 2019 3 commits
    • Maged Michael's avatar
      hazptr: Allow destruction of obj batch after default domain · 9feea971
      Maged Michael authored
      Summary:
      Allow hazptr_obj_batch-es to outlive the default domain.
      
      Background: Until now it was expected that batches are destructed before the destruction of the default domain. This may be restrictive to good use cases.
      
      This diff removes the above mentioned restriction and gives hazptr_obj_batch::shutdown_and_reclaim() to decide whether or not to access the default domain by supporting a singleton bool in default_hazptr_domain_alive() that could be made to outlive the default domain by calling that function before constructing the user object that may outlive the default domain.
      
      Reviewed By: aary
      
      Differential Revision: D18297698
      
      fbshipit-source-id: 6021479ab36ce86d2c411fd71974fde47f7502a2
      9feea971
    • Eric Niebler's avatar
      permit `co_return {};` in a coro::Task<T>-returning coroutine to default-construct a T · ddf4beb9
      Eric Niebler authored
      Summary: In a coroutine returning a `coro::Task<T>`, make `co_return {};` return a default-constructed `T` rather than a default-constructed `folly::Try`.
      
      Reviewed By: yfeldblum, andriigrynenko
      
      Differential Revision: D18466785
      
      fbshipit-source-id: ed20f0f5ad98a0ef8e693e490417a7e36f706822
      ddf4beb9
    • Orvid King's avatar
      Support newer CRT versions for the portibility shims · 67c9b092
      Orvid King authored
      Summary: Newer CRT versions have changed how certain definitions were gated, so we need to update to support them.
      
      Reviewed By: akrieger, guangyfb
      
      Differential Revision: D18435320
      
      fbshipit-source-id: 40ffc57ed1fe0ad1b01ab834aed9762bde5563cb
      67c9b092
  5. 12 Nov, 2019 3 commits
  6. 11 Nov, 2019 2 commits
  7. 10 Nov, 2019 1 commit
  8. 09 Nov, 2019 2 commits
  9. 08 Nov, 2019 2 commits
    • Lara Lu's avatar
      make ExecutorWithPriority's priority changeable · f59ddd8c
      Lara Lu authored
      Summary:
      We need the ability to dynamically change the priority of an executor when it's executing work. Specifically, we want to de-prioritize a query's work units while it is being executed if it has taken up too much resources.
      Pass a callback function to ExecutorWithPriority which sets the priority upon every add.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D18344806
      
      fbshipit-source-id: c0c59d3982637703e6e7c3793930b9d9fadce6fe
      f59ddd8c
    • Dan Melnic's avatar
      Add folly::hardware_concurrency · a1c28139
      Dan Melnic authored
      Summary:
      Add folly::hardware_concurrency
      
      (Note: this ignores all push blocking failures!)
      
      Reviewed By: yfeldblum
      
      Differential Revision: D18342219
      
      fbshipit-source-id: 806ef7b46e52896fa289a79854e45447929ab632
      a1c28139
  10. 07 Nov, 2019 5 commits
    • Chad Austin's avatar
      ensure folly uses no deprecated entities · 7e195929
      Chad Austin authored
      Summary:
      In preparation for adding a deprecation annotation to
      Synchronized::operator->, ensure that folly builds deprecation-clean.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D18351118
      
      fbshipit-source-id: f90a230d24a95e3983989d2c3caf7a4383a8226a
      7e195929
    • Felix Handte's avatar
      IOBuf: Fix Bug in Cloning with Headroom and Tailroom · 2b501f7f
      Felix Handte authored
      Summary:
      If the source IOBuf is not chained, we short-circuit the cloning logic and
      instead share the existing buffer. This works when we implicitly require the
      clone to have the same headroom and tailroom requirements as the source
      IOBuf. However, the API allows setting other values. We need to test that we
      meet those requirements in order to use the shortcut. This diff adds those
      checks.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D18180574
      
      fbshipit-source-id: 31bfaabd7663cf83faf919d8cb242df0a7a2969d
      2b501f7f
    • Abhinav Rai's avatar
      Fix tests for ExecutorLoopController timer. · 802676ff
      Abhinav Rai authored
      Summary:
      Using a ThreadPoolExecutor instead of calling getCPUExecutor() to get one.
      getCPUExecutor() by default returns an inline executor, which doesn't ensure that sleep is triggered on the same executor as the fiber loop.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D18353758
      
      fbshipit-source-id: 6810d11b12de3f62ac5286dba00d2b4a9d447eba
      802676ff
    • John Strizich's avatar
      remove libnl depedency from open source build · a76c883b
      John Strizich authored
      Summary: We removed this dependency in the code a while ago.
      
      Reviewed By: saifhhasan
      
      Differential Revision: D18366401
      
      fbshipit-source-id: daf1c7865fe0c312694bdf395f9d7ace99f70395
      a76c883b
    • Shai Szulanski's avatar
      Enable KeepAlive support in ScopedEventBaseThread · bf4793bd
      Shai Szulanski authored
      Reviewed By: yfeldblum
      
      Differential Revision: D18356211
      
      fbshipit-source-id: ad2361c65260a1a09f8536d07e5447cfcf5cc552
      bf4793bd
  11. 06 Nov, 2019 3 commits
    • Maged Michael's avatar
      experimental: Add single writer multi-reader fixed hash map · 85d753b7
      Maged Michael authored
      Summary:
      Add a fixed single-writer multi-reader hash map that supports:
      - Copy construction with optional expansion
      - Concurrent read-only lookup.
      - Concurrent read-only iteration.
      
      The map has fixed size. Higher-level users can manage instances of this map to build a more general unbounded map.
      
      Reviewed By: davidtgoldblatt
      
      Differential Revision: D17522603
      
      fbshipit-source-id: b4fcfe427a343f7226d216670536f2594f187bf3
      85d753b7
    • Bo Dong's avatar
      Change Benchmark UserCounter to 64 bit int · 975dc0f9
      Bo Dong authored
      Summary: Change UserCounters to 64bit integer to fit big counters like cpu_cycle counting.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D18249661
      
      fbshipit-source-id: 7808ef51e7230aa929ed555ed837ba5dd1962944
      975dc0f9
    • Xiaofei Du's avatar
      Delete Coro.Throw test · d3676acb
      Xiaofei Du authored
      Summary: Coro.Throw and Coro.FutureThrow are exactly the same. Delete one
      
      Reviewed By: lewissbaker
      
      Differential Revision: D18337140
      
      fbshipit-source-id: 9cf479b3e33599b3c8c982cabc87d1227d4efb9b
      d3676acb
  12. 05 Nov, 2019 3 commits
    • Maged Michael's avatar
      RequestContext: Add microbenchmarks · b6641eb7
      Maged Michael authored
      Summary: Add microbenchmarks for request context operations.
      
      Reviewed By: LeeHowes
      
      Differential Revision: D17434204
      
      fbshipit-source-id: 22c804d71b922dd6894bdf6d98449f0c60c83206
      b6641eb7
    • Genevieve Helsel's avatar
      add pwritevNoInt and preadvNoInt to FileUtil · 08c318db
      Genevieve Helsel authored
      Summary: Adds `pwritevNoInt()` and `preadvNoInt()` to FileUtil.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D18213230
      
      fbshipit-source-id: 0dfcd19ecf4500aa2bba279800d65821309371c6
      08c318db
    • Yedidya Feldblum's avatar
      invoke_traits · 82ca15c5
      Yedidya Feldblum authored
      Summary: [Folly] `invoke_traits`, which can take an invoker and make a traits type that has member traits that look like the std's invoke traits.
      
      Reviewed By: vitaut
      
      Differential Revision: D18082562
      
      fbshipit-source-id: 9cfaf1a43fd695a23f7eb30d28a3c8aaaf2b9b60
      82ca15c5
  13. 04 Nov, 2019 3 commits
    • Abhinav Rai's avatar
      Add timeout support in ExecutorLoopController. · 99e8fc1f
      Abhinav Rai authored
      Summary:
      Add timeout support to python executor. Executor uses a separate thread running a folly event base.
      Whenever a timer operation is called, scheduleTimeout is executed in that event base.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D18201883
      
      fbshipit-source-id: 337518bea52993461201d6706f438130673ef6ce
      99e8fc1f
    • Dan Melnic's avatar
      Add iouring folly support, refactor the async IO · 60da8ef5
      Dan Melnic authored
      Summary: Add iouring folly support, refactor the async IO
      
      Reviewed By: kevin-vigor
      
      Differential Revision: D17834511
      
      fbshipit-source-id: e20c876a32730549f305334fd5eed02cccf23638
      60da8ef5
    • Bo Dong's avatar
      remove the namespace dependency of BENCHMARK_COUNTERS · b35bea8f
      Bo Dong authored
      Summary: BENCHMARK_COUNTERS tests need to set `using folly::UserCounters` or `using namespace folly`. Add absolute namespace path in the macro to get rid of this requirement.
      
      Reviewed By: Orvid
      
      Differential Revision: D18271700
      
      fbshipit-source-id: 084041142b7c245e3c861943570416ac89ea6c34
      b35bea8f
  14. 02 Nov, 2019 1 commit
  15. 01 Nov, 2019 1 commit
    • Luca Wehrstedt's avatar
      Support non-byte and non-1d memoryviews when converting to IOBufs · 8718c37f
      Luca Wehrstedt authored
      Summary:
      Using `shape[0]` as the length of the IOBuf means using the number of _elements_ along the first dimension, rather than the total number of bytes in the memoryview. Thus
      - if the element size is not 1 byte, this will get only a fraction of the memory;
      - if the memoryview is shapeless, the code will segfault;
      - if the memoryview is multidimensional, it will only get a fraction of the memory (and, if the memory is C-contiguous, it will be an odd slice: in a 2x3 memoryview, it will get the entire first row and half of the second).
      
      Perhaps the above was intentional, but I believe that when converting a shaped and typed object to an unshaped and untyped buffer, it's more intuitive to ignore the type and size and just look at the memory backing it.
      
      I also added a check to ensure the view is contiguous. IOBufs can't represent a non-contiguous buffer, except by using a chain, which however in this case could have an arbitrary unbounded length, making it unadvisable. Alternatively we could copy the memory, but this is probably not what the user would expect. Disallowing this seems the safest option.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D18006273
      
      fbshipit-source-id: f21dbb462266eee68f1a5ce0ecea85b1a46e0a8b
      8718c37f