[Semi-OT] Fibers vs. Async / Await

René Zwanenburg renezwanenburg at gmail.com
Thu May 12 11:37:34 UTC 2022


On Wednesday, 11 May 2022 at 13:49:28 UTC, rikki cattermole wrote:
> Don't forget the extra cost of having to scan those stacks 
> regardless of those fibers state.
>
> The context state required for a task will be a lot smaller 
> (and hence cheaper) than what a single fiber stack will cost to 
> scan.

That's a good point. As an improvement, could we mark the unused 
part of the fiber's stack as NO_SCAN when it yields? And ofc undo 
it when the fiber switches back in. Or would that be too heavy an 
operation?


More information about the Digitalmars-d mailing list