News for hackers. Stuff that matters.
Re:A hybrid thread / fiber task scheduler written in C++ 11 by spc476 on Sunday February 09, 2020 @09:55PM (#22286056)
With cooperative multitasking (coroutines) you can get by with saving less CPU state. I do this for my C coroutines package [1] for x86 and x86-64 by only saving the registers required by the calling convention.

[1] https://github.com/spc476/C-Coroutines

Re:A hybrid thread / fiber task scheduler written in C++ 11 by headlessclayton on Monday February 10, 2020 @05:00AM (#22287751)
Marl does exactly this. The scheduler guarantees that once a task is started on a particular thread, it will only resume on that same thread. This allows us to save a bare minimum of registers and state.

Some more info here: https://github.com/google/marl/blob/cbef55d588bc28661bedb822...