[vos-d] s5 concurrency (design part 2)
Karsten Otto
otto at inf.fu-berlin.de
Wed Apr 11 12:20:21 EDT 2007
Am 10.04.2007 um 18:05 schrieb Peter Amstutz:
> I should also note these two options arn't incompatible, so there's
> likely no reason we can't have both continuations and user-level
> threads. My preference is towards cooperative threads, however,
> unfortunately portability is going to be difficult as Linux,
> Windows and
> OS X all seem to use different APIs for this. I haven't yet found a
> library that abstracts it across operating systems in the same way
> that
> has been done for OS threads. Most "portable user-level thread
> libraries" I have found actually use setjmp/longjmp, which doesn't
> preserve the stack.
>
Ok, I get it. What you say sounds exactly like the Simula coroutine
concept, where you use an exchange jump to switch between multiple
stacks. This is not necessarily the same as user-level threads, in
particular when blocking I/O is involved.
...
Digging around a bit I found http://en.wikipedia.org/wiki/Coroutine
which explains this nicely, lists a few libraries, and even mentions
the Actor model (duh) :-)
You probably know this page already, but I thought I'd mention it
anyway just in case.
Regards,
Karsten Otto (kao)
More information about the vos-d
mailing list