
30 Mar
2006
30 Mar
'06
6:03 a.m.
On 29 March 2006 17:34, Neil Mitchell wrote:
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...
Neil, What does YHC do about in-progress thunk evaluations when a context switch happens? Does it use blackholing like GHC, or does it portentially duplicate the work, or something else? Cheers, Simon