Pre-emptive or co-operative concurrency (was: Concurrency)

Neil Mitchell ndmitchell at gmail.com
Wed Mar 29 11:34:23 EST 2006


Hi,

> context-switches happen only on specific events, which every
> thread will usually engage in, although it need not always do so:
>
> 1 only calls to yield
> 2 any calls to concurrency library api
> 3 any allocation

The Yhc concurrency switches every n instructions, and therefore even
an "evil" thread cannot lock up the system.

Of course, even with fully pre-emptive scheduling, you've still got deadlocks...

Thanks

Neil


More information about the Haskell-prime mailing list