|
proxygen
|
#include <GILAwareManualExecutor.h>
Public Member Functions | |
| void | add (Func) override |
| void | drive () override |
Public Member Functions inherited from folly::DrivableExecutor | |
| ~DrivableExecutor () override=default | |
Public Member Functions inherited from folly::Executor | |
| virtual | ~Executor () |
| virtual void | addWithPriority (Func, int8_t priority) |
| virtual uint8_t | getNumPriorities () const |
Private Member Functions | |
| void | waitBeforeDrive () |
| void | driveImpl () |
Private Attributes | |
| std::mutex | lock_ |
| std::queue< Func > | funcs_ |
| std::condition_variable | cv_ |
Additional Inherited Members | |
Static Public Member Functions inherited from folly::Executor | |
| template<typename ExecutorT > | |
| static KeepAlive< ExecutorT > | getKeepAliveToken (ExecutorT *executor) |
| template<typename ExecutorT > | |
| static KeepAlive< ExecutorT > | getKeepAliveToken (ExecutorT &executor) |
Static Public Attributes inherited from folly::Executor | |
| static const int8_t | LO_PRI = SCHAR_MIN |
| static const int8_t | MID_PRI = 0 |
| static const int8_t | HI_PRI = SCHAR_MAX |
Protected Member Functions inherited from folly::Executor | |
| virtual bool | keepAliveAcquire () |
| virtual void | keepAliveRelease () |
Static Protected Member Functions inherited from folly::Executor | |
| template<typename ExecutorT > | |
| static bool | isKeepAliveDummy (const KeepAlive< ExecutorT > &keepAlive) |
| template<typename ExecutorT > | |
| static KeepAlive< ExecutorT > | makeKeepAlive (ExecutorT *executor) |
A simple ManualExecutor intended to be run directly on a Python thread. It releases Python GIL while waiting for tasks to execute.
Definition at line 34 of file GILAwareManualExecutor.h.
|
overridevirtual |
Enqueue a function to executed by this executor. This and all variants must be threadsafe.
Implements folly::Executor.
Definition at line 26 of file GILAwareManualExecutor.cpp.
References cv_, funcs_, folly::lock(), lock_, and folly::gen::move.
|
inlineoverridevirtual |
Implements folly::DrivableExecutor.
Definition at line 39 of file GILAwareManualExecutor.h.
References driveImpl(), and waitBeforeDrive().
|
private |
Definition at line 51 of file GILAwareManualExecutor.cpp.
References funcs_, folly::lock(), lock_, and folly::gen::move.
Referenced by drive().
|
private |
Definition at line 34 of file GILAwareManualExecutor.cpp.
References cv_, funcs_, folly::lock(), lock_, and SCOPE_EXIT.
Referenced by drive().
|
private |
Definition at line 50 of file GILAwareManualExecutor.h.
Referenced by add(), and waitBeforeDrive().
|
private |
Definition at line 49 of file GILAwareManualExecutor.h.
Referenced by add(), driveImpl(), and waitBeforeDrive().
|
private |
Definition at line 48 of file GILAwareManualExecutor.h.
Referenced by add(), driveImpl(), and waitBeforeDrive().