class SynchronizedDispatcher
Defined at line 205 of file ../../sdk/lib/driver/runtime/include/lib/fdf/cpp/dispatcher.h
Dispatcher that disallows parallel calls into callbacks.
Public Methods
zx::result<SynchronizedDispatcher> Create (Options options, std::string_view name, ShutdownHandler shutdown_handler, std::string_view scheduler_role)
Creates a dispatcher for performing asynchronous operations.
|options| provides the dispatcher configuration. This will panic if options does not
set FDF_DISPATCHER_OPTION_SYNCHRONIZED.
|name| is reported via diagnostics. It is similar to setting the name of a thread. Names longer
than `ZX_MAX_NAME_LEN` may be truncated.
|scheduler_role| is a hint. It may or not impact the priority the work scheduler against the
dispatcher is handled at. It may or may not impact the ability for other drivers to share
zircon threads with the dispatcher.
|shutdown_handler| will be called after |ShutdownAsync| has been called, and the dispatcher
has completed its asynchronous shutdown. The client must keep any pointers that are
referenced in |shutdown_handler| alive until the handler runs.
# Thread requirements
This must be called from a thread managed by the driver runtime.
# Errors
ZX_ERR_INVALID_ARGS: This was not called from a thread managed by the driver runtime.
ZX_ERR_BAD_STATE: Dispatchers are currently not allowed to be created, such as when a driver
is being shutdown by its driver host.
Defined at line 245 of file ../../sdk/lib/driver/runtime/include/lib/fdf/cpp/dispatcher.h
void SynchronizedDispatcher (fdf_dispatcher_t * dispatcher)
Defined at line 271 of file ../../sdk/lib/driver/runtime/include/lib/fdf/cpp/dispatcher.h
Unowned<SynchronizedDispatcher> borrow ()
Defined at line 278 of file ../../sdk/lib/driver/runtime/include/lib/fdf/cpp/dispatcher.h