Concurrency
Simon Marlow
simonmar at microsoft.com
Mon Apr 3 04:37:37 EDT 2006
On 31 March 2006 13:41, John Meacham wrote:
> I have tried to summarize the current thinking into a proposal on the
> wiki.
>
>
http://haskell.galois.com/cgi-bin/haskell-prime/trac.cgi/wiki/Concurrenc
y
>
> I split it into 3 parts.
>
> the standard - all haskell' compilers must implement
>
> optional preemption - ability to preempt pure code, fairness
> guarentees, interleaved evaluation operators (merge, nmerge)
>
> optional OS threads - bound threads, SMP, reentrant concurrent FFI
> calls supported.
>
> comment or modify it at will.
Great. Apart from my misgivings about allowing cooperative scheduling
at all, here's a few comments on the proposal:
- I wouldn't include threadWaitRead, threadWaitWrite,
or threadDelay at all. These can all be implemented using
FFI, so don't belong in the concurrency library. Their
presence is largely historical.
- yield bothers me a little. If it weren't for cooperative
systems, yield would be semantically a no-op, because the
no-starvation guarantee means you never need it for
correctness. I think it's ok, just a bit unsettling.
- In the optional OS threads section it says "allows multiple
haskell threads to run at once" - actually you can provide
all that without allowing multiple haskell threads to run
at once, eg. ghc-6.4.1 with -threaded. I'll modify it.
Cheers,
Simon
More information about the Haskell-prime
mailing list