[fpc-pascal] Portable coroutines

Michael Schnell mschnell at lumino.de
Mon Mar 23 10:01:36 CET 2015


On 03/20/2015 11:09 PM, Mark Morgan Lloyd wrote:
> Efficient implementation of coroutines requires CPU-specific code in 
> the RTL and possibly the compiler. However 
> http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html suggests a 
> way that coroutines can be implemented in a portable fashion in C, how 
> can this be done in Object Pascal?
>
Lazarus seems to supports a similar concept by using events and 
"Application.ProcessMessages". it might not be especially efficient, 
though.

-Michael



More information about the fpc-pascal mailing list