[Haskell-cafe] concurrency vs. I/O in GHC

John Lato jwlato at gmail.com
Wed Oct 27 12:00:41 EDT 2010


From: Claude Heiland-Allen <claudiusmaximus at goto10.org>

>
> On 23/10/10 23:17, Donn Cave wrote:
> > Quoth Claude Heiland-Allen<claudiusmaximus at goto10.org>,
> > ...
> >> The conclusion I drew was that "unsafe" foreign functions block the
> >> current "capability" (OS thread) and any "threads" (Haskell forkIO etc)
> >> currently scheduled on that capability, but other capabilities and
> >> threads continue executing as normal.
>
> ... until GC time when all capabilities must be ready. (?)
>

That's quite interesting.  Thanks very much to everyone who contributed to
this.  I think my understanding of the interactions between threads and
foreign functions has deepened considerably. I may be able to accomplish
what I want after all.

I am somewhat surprised that all capabilities must be ready for GC; I
thought with the parallel GC that wouldn't be necessary.  But I don't know
much about GC implementations so I try not to let their behavior surprise me
too much.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20101027/3ad0fb69/attachment.html


More information about the Haskell-Cafe mailing list