|
| enum | FileDescriptorType { kReadable = 1 << 0
, kWritable = 1 << 1
, kReadWrite = kReadable | kWritable
} |
| |
|
|
Status | NativeInit () |
| |
|
Status | NativeRegisterFileDescriptor (int fd, FileDescriptorType type) |
| |
|
Status | NativeUnregisterFileDescriptor (int fd) |
| |
|
Waker & | NativeAddReadWakerForFileDescriptor (int fd) |
| |
|
Waker & | NativeAddWriteWakerForFileDescriptor (int fd) |
| |
| bool | RunUntilStalled () |
| |
| void | RunToCompletion () |
| |
| void | RunForever () |
| |
|
| Dispatcher (const Dispatcher &)=delete |
| |
|
Dispatcher & | operator= (const Dispatcher &)=delete |
| |
|
| Dispatcher (Dispatcher &&)=delete |
| |
|
Dispatcher & | operator= (Dispatcher &&)=delete |
| |
| void | Terminate () |
| |
| void | Post (Task &task) |
| |
| template<typename T > |
| void | PostShared (const SharedPtr< T > &task) |
| |
| template<typename TaskType , typename... Args, typename = std::enable_if_t<std::is_base_of_v<Task, TaskType>>> |
| SharedPtr< TaskType > | Post (Allocator &allocator, Args &&... args) |
| |
| template<typename Func = void, int &... kExplicitGuard, typename Arg , typename ActualFunc = std::conditional_t<std::is_void_v<Func>, std::decay_t<Arg>, Func>, typename = std::enable_if_t<!std::is_base_of_v<Task, ActualFunc>>> |
| SharedPtr< FuncTask< ActualFunc > > | Post (Allocator &allocator, Arg &&func) |
| |
| template<typename Func > |
| SharedPtr< RunOnceTask< Func > > | RunOnce (Allocator &allocator, Func &&func) |
| |
| template<typename Fut > |
| SharedPtr< FutureTask< Fut > > | PostFuture (Allocator &allocator, Fut &&future) |
| |
| void | LogRegisteredTasks () |
| |
|
|
class | ::pw::async2::Dispatcher |
| |
◆ DoWaitForWake()
| void pw::async2::EpollDispatcher::DoWaitForWake |
( |
| ) |
|
|
overrideprivatevirtual |
Blocks until DoWake() is called. Must return immediately if DoWake() was already called since the last DoWaitForWake call.
If the implementation is unable to block the thread, it must crash.
Implements pw::async2::RunnableDispatcher.
◆ DoWake()
| void pw::async2::EpollDispatcher::DoWake |
( |
| ) |
|
|
overrideprivatevirtual |
Sends a wakeup signal to this Dispatcher.
This method's implementation must ensure that the Dispatcher runs at some point in the future.
DoWake() will only be called once until one of the following occurs:
- Note
- The
internal::lock() may or may not be held here, so it must not be acquired by DoWake, nor may DoWake assume that it has been acquired.
Implements pw::async2::Dispatcher.
The documentation for this class was generated from the following file: