Title: "throwTo & block statements considered harmful"
This is a short essay to prove that the current GHC concurrency
implementation has a critical flaw.
And this is on the wiki at:
http://haskell.org/haskellwiki/GHC/Concurrency#throwTo_.26_block_statements_considered_harmful
T
The key problem is, at least in the presence of block/unblock, that
Exceptions are never reliably delivered.
Never? Even in a function which is in a blocking state?
The implementation of asynchronous signals, as described by the paper
"Asynchronous exceptions in Haskell
Simon Marlow, Simo
Program A and B got word wrapped by mistake...damn it.
Program A
> loop = block (print "alive") >> loop
>
> main = do tid <- forkIO loop
> threadDelay 1
> killThread tid
the above print "alive" forever while killThread stays blocked.
Program B
> loop = block (print "alive") >
To: Chris Kuklewicz
| Cc: GHC Users
| Subject: Re: throwTo & block statements considered harmful
|
| > The key problem is, at least in the presence of block/unblock, that
| > Exceptions are never reliably delivered.
|
| Never? Even in a function which is in a blocking state?
|
| > The
Hello Cat,
Friday, December 8, 2006, 5:00:46 PM, you wrote:
>> The implementation of asynchronous signals, as described by the paper
>> "Asynchronous exceptions in Haskell
>> Simon Marlow, Simon Peyton Jones, Andy Moran and John Reppy, PLDI'01."
>> is fatally inconsistent with the implementat