[Haskell-cafe] Re: Optimizing locking with MVars

Simon Marlow simonmarhaskell at gmail.com
Thu May 4 04:10:35 EDT 2006

Bulat Ziganshin wrote:

> after Simon's message i thought about this problem. i found several
> situations where "restoring" of locked file will be useful:
> - using stdout and other standard handles. we may need to print error
> message or just continue work despite the exception abandoned our
> previous writing to stdout
> - access to database. despite the exception arrived during previous
> operation, we need to go further and just hSeek to the position of
> next I/O operation

Certainly the stream should be resilient to exceptions: if an exception 
occurs during an operation, that shouldn't prevent subsequent operations 
from proceeding as normal.  Asynchronous exceptions should behave just 
like synchronous ones in this respect.


More information about the Haskell-Cafe mailing list