[Haskell-cafe] Re: Concurrency questions

Achim Schneider barsoap at web.de
Sun Jan 6 06:45:03 EST 2008


Andrew Coppin <andrewcoppin at btinternet.com> wrote:

> 2. I have a situation where I have a thread generating some data and 
> putting it into a mutable array, and another thread trying to read
> that data. Is there a way I can make the reader thread block if it
> tries to read a cell that hasn't been computed yet, but not introduce
> too much overhead for cells that have been filled in?
> 
This
http://www.haskell.org/ghc/docs/latest/html/libraries/stm/Control-Concurrent-STM-TChan.html
could be what you're looking for.


-- 
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
signature prohibited. 



More information about the Haskell-Cafe mailing list