feat: new fiber abstractions
Closes #14 (closed)
There are now 2 types of fibers
- Immediate - a fiber that starts executing immediately
- Deferred - a fiber that is scheduled for execution Both of them come in 2 variants, consider the case of Immediate:
-
Immediate<F, T>
- has a fiber function that returns a T -
UnitImmediate<F>
- has a fiber function that returns nothing. This is an optimized version ofImmediate<F, ()>
. Same with Deferred and UnitDeferred.
All of these fibers are joinable. Non-joinable fibers are not supported yet.
Edited by Alexey Protsenko