Defined in carb/thread/IThreadUtil.h

using carb::thread::RelayTaskFn = void (*)(RelayFlags flags, void *context)

Prototype for a relayed task function.


The prototype for a task function to be executed on the relayed task thread. This function is expected to complete its task and return in a timely fashion. This should never block or perform a task that has the possibility of blocking for an extended period of time.


Neither this function nor anything it calls may throw an exception unless the task function itself catches and handles that exception. Throwing an exception that goes uncaught by the task function will result in the process being terminated.

Param flags

[in] The flags controlling the behavior of this relay task. This may include either fRelayFlagBlocking or any of the set bits in fRelayAvailableFlagsMask. The bits in the mask may be used for any purpose specific to the task function.

Param context

[inout] An opaque value specific to this task. This will be passed unmodified to the task function from the task’s descriptor when it is executed. If the task function needs to return a value, it may be done through this object.


No return value.