(no title)
bicarbonato | 2 years ago
Kernel Threads (aka threads): OS-Level and preemptive.
Green Threads (aka lightweight threads, virtual threads or goroutines): User-level and preemptive.
Fibers: User-level (sometimes OS-level or offered as a OS library, like in Windows) and cooperative.
Coroutines: User-level and cooperative.
dwaite|2 years ago
Fibers are distinct in that they have no scheduling and are code being run on a thread - if the thread is preempted, it will resume on that same thread. Unlike cooperative threading, they must explicitly yield.
Coroutines have such varying implementations that you would need to define requirements to know if they count as fibers or not - for instance, whether you mandate a C-compatible stack.
foota|2 years ago
gpderetta|2 years ago