![]() |
Zen
A cross-platform functional programming language
|
Implementation of run queue. More...
Public Member Functions | |
| RunQueue (Engine &engine) | |
| Default constructor. | |
| void | enqueFiber (Fiber::Ptr &ptr) |
| Enqueue a fiber. | |
| void | processRunCtx (const Fiber::Ptr &fiber, zbl::RunContext &ctx) |
| Process run context Creates a new fiber for each new continuation returned by the fcall and adds it to the runque. | |
| int | pump () |
| Pump the run queue. | |
| void | enque (RunContext &ctx) |
| Enqueue fibers from run context. | |
Private Member Functions | |
| RunQueue (const RunQueue &src) | |
| Copy constructor. | |
| bool | dequeFiber (Fiber::Ptr &ptr) |
| Dequeue a fiber. | |
Private Attributes | |
| Engine & | _engine |
| The engine. | |
| z::queue< Fiber * > | _fiberList |
| The fiber list. | |
Implementation of run queue.
Maintains a list of fibers to run. An engine can have multiple run queues
| bool dequeFiber | ( | Fiber::Ptr & | ptr | ) | [inline, private] |
Dequeue a fiber.
| ptr | Autoptr for fiber |
| void enque | ( | RunContext & | ctx | ) | [inline] |
Enqueue fibers from run context.
| ctx | The run context |
| void enqueFiber | ( | Fiber::Ptr & | ptr | ) | [inline] |
Enqueue a fiber.
| ptr | Autoptr for fiber |
| void processRunCtx | ( | const Fiber::Ptr & | fiber, |
| zbl::RunContext & | ctx | ||
| ) | [inline] |
Process run context Creates a new fiber for each new continuation returned by the fcall and adds it to the runque.
| fiber | Base fiber to clone for each new fiber |
| ctx | Run context |
| int pump | ( | ) | [inline] |
Pump the run queue.