|
Loom C API
Public Loom compiler C API
|
Base embedded at offset zero in one caller-defined work record. More...
Data Fields | |
| const loomc_task_vtable_t * | vtable |
| Static callbacks implementing the concrete task. | |
| loomc_task_t * | next |
| Sink-owned intrusive link while the accepted task is queued. | |
Base embedded at offset zero in one caller-defined work record.
A task has one ownership reference and is not reference counted. Successful submission transfers that reference to the sink, which executes the task exactly once and then destroys it exactly once. Failed submission leaves destruction to the caller.
| loomc_task_t* loomc_task_t::next |
Sink-owned intrusive link while the accepted task is queued.
Task initialization sets this to NULL. A sink may use it only between accepting the task and invoking its terminal callback, and must clear it before execution. Exclusive task ownership permits one queue membership at a time.