template<typename Native>
class pw::async2::DispatcherForTestFacade< Native >
DispatcherForTestFacade defines the interface for DispatcherForTest. Backends must provide:
- A
pw_async2_backend/native_dispatcher_for_test.h header.
- A class or alias named
pw::async2::backend::NativeDispatcherForTest that:
|
|
| DispatcherForTestFacade ()=default |
| | DispatcherForTest is default constructible.
|
| |
|
| DispatcherForTestFacade (const DispatcherForTestFacade &)=delete |
| |
|
DispatcherForTestFacade & | operator= (const DispatcherForTestFacade &)=delete |
| |
|
| DispatcherForTestFacade (DispatcherForTestFacade &&)=delete |
| |
|
DispatcherForTestFacade & | operator= (DispatcherForTestFacade &&)=delete |
| |
| void | AllowBlocking () |
| |
|
template<typename T > |
| auto | RunInTaskUntilStalled (T &future) |
| | Runs a future in a FutureTask until no progress can be made.
|
| |
| void | RunToCompletionUntilReleased () |
| |
| void | Release () |
| |
| uint32_t | tasks_polled () const |
| |
|
uint32_t | tasks_completed () const |
| | Returns the total number of tasks the dispatcher has run to completion.
|
| |
|
uint32_t | wake_count () const |
| | Returns the total number of times the dispatcher has been woken.
|
| |
| 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 () |
| |