hazptr: Use executor for default domain asynchronous reclamation
Summary: Add support for using an executor for asynchronous reclamation. This enables doing asynchronous reclamation on a dedicated executor, which serves two purposes: (1) Avoid unpredictable latencies for regular thread operations (that happen to trigger synchronous reclamation). (2) Avoid deadlock that may arise from regular threads running deleters that may require resources held by such threads. By default the QueuedImmediateExecutor is used. A member function set_executor allows the use of different executors. The intent is to use a thread pool executor. In order to avoid cyclical dependency, subsequent diffs (1) add in a separate library a function make the default hazptr domain use a thread pool executor and (2) add a call to such function to folly/init. Reviewed By: davidtgoldblatt Differential Revision: D19107049 fbshipit-source-id: 540e9d3aea786a8ece7958d6c09b9429e2a2f4a5
Showing
Please register or sign in to comment