News for hackers. Stuff that matters.
Re:A Foray for Fun into Windows Fibers by vlovich123 on Friday June 18, 2021 @10:57AM (#27551025)
Seems like adopting async/await throughout would accomplish the same benefits (letting you co-operatively yield whenever you want) while maintaining the performance of the state machine (since that's what async/await is in a single-threaded context).
Re:A Foray for Fun into Windows Fibers by near on Friday June 18, 2021 @11:37PM (#27557532)
The key thing is that I need to be able to suspend 3-5 layers deep into the call frame. The instruction dispatcher calls into an instruction which calls into a bus memory read function which triggers a DMA transfer that then needs to switch to the video processor, and then I need to resume right there inside the DMA transfer function once the video processor has caught up in time. So the extra stack frame for each fiber/thread is essential.