Stack frames larger than 4K should be rejected, but what if I want more

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Mon Jun 28 08:44:30 UTC 2021


On Monday, 28 June 2021 at 07:27:46 UTC, Luis wrote:
> I'm pretty worried how this would affect the actual 
> coroutines/fibers implementation. I'm slowly trying to write a 
> retro game engine that uses a lot of fibers (hundreds!) on a 
> single thread.

Did you mean the proposed 4K limitation? Your project sounds like 
a fun project! I started programming on a CBM64 8-bit computer 
with hardware sprites… ;-). Seems like your project could be a 
use case for stackless coroutines. I was quite surprised to see 
that embedded programmers also care a lot about stackless 
coroutines as they can implement state machines with predictable 
memory consumption. There is also a presentation on youtube that 
explains how database search optimizations can make good use of 
them to speed up parallell binary searches in indexes. Also 
surprising to me. Seems to be a lot of room for innovation in the 
concurrency design space.







More information about the Digitalmars-d mailing list