work 0.1.0
A gig is a bunch of related work. The pool does the work.
Loading...
Searching...
No Matches
work::context< T > Class Template Referenceexport
module work

Borrowed owner-local submissions; valid only during its handler call. Children are accepted after close(): they belong to the already accepted task. Never share this context with another thread or retain it after the callback. More...

Public Member Functions

void push (T value) noexcept
 Push a child on this worker's private stack without synchronization.
void poll () noexcept
 Donate older queued work when the accumulated stochastic deadline is due.
bool pop (T &result) noexcept
 Pop one task in a context-only batch handler, up to this activation's quantum. False ends this batch, not necessarily the gig. Only the batch handler may consume tasks; contexts passed alongside a task are for child submission.
std::size_t index () const noexcept
 This activation's lane index, stable for the lifetime of the callback.

Friends

template<task U, class Handler>
class work::gig

Detailed Description

template<task T>
class work::context< T >

Borrowed owner-local submissions; valid only during its handler call. Children are accepted after close(): they belong to the already accepted task. Never share this context with another thread or retain it after the callback.

Definition at line 228 of file work.ccm.


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