Okay, I skimmed rts/Schedule.c and now see the problem you mentioned :(

> On the non-threaded runtime the timeslice case doesn't apply and you only
> have one capability, it will force a GC to try to revive some tasks, and if
> at the end of
> this the tasks are still blocked it will release one in order to attempt to
> proceed. In short, as far as I can tell I don't think it considers
> reach-ability at all, not for MVars.

Maybe that should be considered a false positive (bug) for the deadlock 
checker?  Just because the Haskell runtime has a single thread, that doesn't 
imply the whole program is necessarily single-threaded (in the presence of 
foreign things).  I'd think this is a legitimate use case for MVars.
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to