mirror of
https://github.com/janet-lang/janet
synced 2025-11-14 14:27:13 +00:00
Add a "new_channel" for root fibers.
When new fibers are scheduled on the event loop, this new_channel receives the newly created fibers. This lets a fiber track which fibers have been added and let's a user implement a supervisor. Fix formatting.
This commit is contained in:
@@ -842,7 +842,8 @@ struct JanetFiber {
|
||||
#ifdef JANET_EV
|
||||
JanetListenerState *waiting;
|
||||
uint32_t sched_id; /* Increment everytime fiber is scheduled by event loop */
|
||||
void *supervisor_channel; /* Channel to push self to when signaling. */
|
||||
void *done_channel; /* Channel to push self to when complete */
|
||||
void *new_channel; /* Channel to push spawned children */
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user