Detailed Description
struct oscr::node_with_worker< Node >
An execution node which applies its worker results at the beginning of its own tick.
avendish's worker contract is that the function work() returns is invoked back in the processing thread against the object, which may write its outlets from there. Execution::Context::executionQueue cannot honour that: it is drained before the graph runs, and ossia::graph_util::init_node then clears every outlet of the node and sets the tick's frame indices. Queuing the results on the node and draining them here instead means the outlets are cleared, the frame indices are those of this tick, and operator() has not run yet - so whatever the result writes to a port is delivered for this tick, and whatever it writes to an output field is flushed by the usual finish_run() at the end of it.
Public Member Functions | |
| void | run (const ossia::token_request &tk, ossia::exec_state_facade st) noexcept override |
Public Attributes | |
| Execution::ExecutionCommandQueue | worker_results |
Member Data Documentation
◆ worker_results
| Execution::ExecutionCommandQueue oscr::node_with_worker< Node >::worker_results |
Filled on the Qt main thread by Executor::connect_worker, drained on the execution thread: same producer / consumer pair as the execution queue.
The documentation for this struct was generated from the following file: