In our previous episode, Mark Morgan Lloyd said:
> > They are not really threads. They must be scheduled within threads.
> > https://msdn.microsoft.com/en-us/library/windows/desktop/ms682661(v=vs.85).aspx
> > from the article they don't seem to have that many advantages, except 
> > toconvert existing manual m:n scheduling apps.
> 
> Which effectively makes them coroutines, but since they're MS-only 
> they're nonportable.

What exactly makes them coroutines? Maybe that they  implement a local stack
concept.  But you still would have to integrate that with FPC (exception
handling, stack checking), so at the basic level it only saves some asm
switching contexts.

But maybe the OS support for stack switching makes things like keeping SEH
working easier. (not that that is enabled by default for 32-bit windows x86)

> Which is more or less where Ryan started off the 
> other thread.

It suddenly occured to me that that piece of code is compatible to nothing
in FPC, since the only likely target in FPC (win32 x86) doesn't use SEH.
There is a define to enable it though ( -dTEST_WIN32_SEH )
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to