On 4 May 2012 14:12, Simon Marlow wrote:
> The forked thread is deadlocked, so the MVar is considered unreachable and
> the main thread is also unreachable. Hence both threads get sent the
> exception.
>
> The RTS does this analysis using the GC, tracing the reachable objects
> starting from the
On 03/05/2012 17:14, Bas van Dijk wrote:
On 3 May 2012 17:31, Edward Z. Yang wrote:
Excerpts from Bas van Dijk's message of Thu May 03 11:10:38 -0400 2012:
As can be seen, the putMVar is executed successfully. So why do I get
the message: "thread blocked indefinitely in an MVar operation"?
G
On 3 May 2012 18:14, Bas van Dijk wrote:
> Now it seems the thread is killed while delaying. But why is it
> killed?
Oh I realise the forked thread is killed because the main thread
terminates because it received a BlockedIndefinitelyOnMVar exception
and then all daemonic threads are killed.
Bas
On 3 May 2012 17:31, Edward Z. Yang wrote:
> Excerpts from Bas van Dijk's message of Thu May 03 11:10:38 -0400 2012:
>> As can be seen, the putMVar is executed successfully. So why do I get
>> the message: "thread blocked indefinitely in an MVar operation"?
>
> GHC will send BlockedIndefinitelyOnM
Excerpts from Bas van Dijk's message of Thu May 03 11:10:38 -0400 2012:
> As can be seen, the putMVar is executed successfully. So why do I get
> the message: "thread blocked indefinitely in an MVar operation"?
GHC will send BlockedIndefinitelyOnMVar to all threads involved
in the deadlock, so it'
Hello,
Before I turn the following into a ticket I want to ask if I miss
something obvious:
When I run the following program:
-
import Prelude hiding (catch)
import Control.Exception
import Control.Concurrent
main :: IO ()
main = do
mv <- newEmp