Pigweed
C/C++ API Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
pw::system::AsyncCore Class Reference

Public Member Functions

Allocatorallocator ()
 Returns the system pw::Allocator instance.
 
async2::Dispatcherdispatcher ()
 Returns the system pw::async2::Dispatcher instance.
 
rpc::Server & rpc_server ()
 Returns the system pw::rpc::Server instance.
 
bool RunOnce (Function< void()> &&function)
 

Friends

AsyncCorepw::System ()
 
void pw::SystemStart (channel::ByteReaderWriter &)
 

Detailed Description

The global pw::System() instance. This object is safe to access, whether pw::SystemStart has been called or not.

Member Function Documentation

◆ RunOnce()

bool pw::system::AsyncCore::RunOnce ( Function< void()> &&  function)

Runs a function once on a separate thread. If the function blocks, it may prevent other functions from running.

Returns
true if the function was enqueued to run, false if the function queue is full

The documentation for this class was generated from the following file: