
4 May
2006
4 May
'06
4:10 a.m.
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. Cheers, Simon