On Fri, 2007-06-22 at 15:34 +1000, Thomas Conway wrote:
> On 6/22/07, Duncan Coutts <[EMAIL PROTECTED]> wrote:
> > You might find that lazy IO is helpful in this case. The primitive that
> > implements lazy IO is unsafeInterleaveIO :: IO a -> IO a
> 
> Personally, unsafeInterleaveIO is so horribly evil, that even just
> having typed the name, I'll have to put the keyboard through the
> dishwasher (see http://www.coudal.com/keywasher.php). Also, I need to
> support concurrent querying and updates, and trying to manage the
> locking is quite hard enough as it is, without trying to keep track of
> which postings vectors have closures pointing to them!

Ah yes, fair enough. If you're doing updates at the same time then lazy
IO isn't appropriate as you need control over when the IO happens.

Duncan

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to