athanggupte / Cotton

A user-space fibers based concurrency and scheduling library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yielding inside fibers

athanggupte opened this issue · comments

Assumption: A fiber would only want to switch to another fiber that it is explicitly "familiar" with - like a child fiber or a parent fiber. (Or another sibling fiber)

So we can simply CreateFiberFromJobDecl for a JobDecl and then switchToFiber.

Yielding will yield to the jobSchedulerFiber (does not take any input arguments)