#1657: throwTo + unsafeInterleaveIO oddness
-------------------------------+--------------------------------------------
    Reporter:  guest           |        Owner:              
        Type:  bug             |       Status:  merge       
    Priority:  normal          |    Milestone:  _|_         
   Component:  Runtime System  |      Version:  6.6.1       
    Keywords:                  |     Testcase:              
   Blockedby:                  |   Difficulty:  Unknown     
          Os:  Windows         |     Blocking:              
Architecture:  x86             |      Failure:  None/Unknown
-------------------------------+--------------------------------------------
Changes (by simonmar):

  * status:  new => merge


Comment:

 This is probably the same issue as #3997, which I fixed in the IO library.

 The underlying problem is that when an asynchronous exception is caught
 and re-thrown, it is thrown synchronously.  This only makes a difference
 inside `unsafePerformIO` and `unsafeInterleaveIO`, where there might be a
 resumable computation that will be updated with the exception.  In order
 to fix this, the asynchronous exception has to be re-thrown
 asynchronously, which is possible (using `myThreadId` and `throwTo`), but
 then the exception handler has to be prepared to resume when the enclosing
 computation is demanded.  In the case of the IO library we arranged that
 the IO operation is re-done, but in general what to do is application-
 specific.

 So I'm going to close this bug, I don't think there's anything else we can
 do.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1657#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to