Skip to content

feat: new fiber abstractions

Alexey Protsenko requested to merge feature/better-fibers into master

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 of Immediate<F, ()>. Same with Deferred and UnitDeferred.

All of these fibers are joinable. Non-joinable fibers are not supported yet.

Edited by Alexey Protsenko

Merge request reports