[project @ 2005-04-22 17:00:49 by sof] [mingw only] Better handling of I/O request abortions upon throwing an exception to a Haskell thread. As was, a thread blocked on an I/O request was simply unblocked, but its corresponding worker thread wasn't notified that the request had been abandoned.
[project @ 2005-04-22 17:00:49 by sof]
[mingw only]
Better handling of I/O request abortions upon throwing an exception
to a Haskell thread. As was, a thread blocked on an I/O request was
simply unblocked, but its corresponding worker thread wasn't notified
that the request had been abandoned.

This manifested itself in GHCi upon Ctrl-C being hit at the prompt -- the
worker thread blocked waiting for input on stdin prior to Ctrl-C would
stick around even though its corresponding Haskell thread had been
thrown an Interrupted exception. The upshot was that the worker would
consume the next character typed in after Ctrl-C, but then just dropping
it. Dealing with this turned out to be even more interesting due to
Win32 aborting any console reads when Ctrl-C/Break events are delivered.

The story could be improved upon (at the cost of portability) by making
the Scheduler able to abort worker thread system calls; as is, requests
are cooperatively abandoned. Maybe later.

Also included are other minor tidyups to Ctrl-C handling under mingw.

Merge to STABLE.

nushio3/ghc,gcampax/ghc,snoyberg/ghc,ghc-android/ghc,gridaphobe/ghc,fmthoma/ghc,ml9951/ghc,tibbe/ghc,jstolarek/ghc,AlexanderPankiv/ghc,anton-dessiatov/ghc,christiaanb/ghc,mcschroeder/ghc,mfine/ghc,anton-dessiatov/ghc,siddhanathan/ghc,tibbe/ghc,vTurbine/ghc,ml9951/ghc,sgillespie/ghc,GaloisInc/halvm-ghc,mettekou/ghc,GaloisInc/halvm-ghc,tibbe/ghc,GaloisInc/halvm-ghc,holzensp/ghc,mcschroeder/ghc,frantisekfarka/ghc-dsi,bitemyapp/ghc,nkaretnikov/ghc,tjakway/ghcjvm,nushio3/ghc,sdiehl/ghc,da-x/ghc,vikraman/ghc,ezyang/ghc,oldmanmike/ghc,spacekitteh/smcghc,vTurbine/ghc,frantisekfarka/ghc-dsi,nushio3/ghc,snoyberg/ghc,mcschroeder/ghc,ghc-android/ghc,olsner/ghc,forked-upstream-packages-for-ghcjs/ghc,sgillespie/ghc,nathyong/microghc-ghc,elieux/ghc,frantisekfarka/ghc-dsi,ezyang/ghc,green-haskell/ghc,ryantm/ghc,shlevy/ghc,oldmanmike/ghc,anton-dessiatov/ghc,olsner/ghc,urbanslug/ghc,nushio3/ghc,tjakway/ghcjvm,ghc-android/ghc,sdiehl/ghc,AlexanderPankiv/ghc,acowley/ghc,da-x/ghc,anton-dessiatov/ghc,urbanslug/ghc,ezyang/ghc,gcampax/ghc,wxwxwwxxx/ghc,nushio3/ghc,forked-upstream-packages-for-ghcjs/ghc,shlevy/ghc,oldmanmike/ghc,TomMD/ghc,vikraman/ghc,AlexanderPankiv/ghc,olsner/ghc,siddhanathan/ghc,nathyong/microghc-ghc,forked-upstream-packages-for-ghcjs/ghc,AlexanderPankiv/ghc,fmthoma/ghc,gcampax/ghc,urbanslug/ghc,urbanslug/ghc,elieux/ghc,urbanslug/ghc,ezyang/ghc,snoyberg/ghc,vTurbine/ghc,mfine/ghc,ryantm/ghc,shlevy/ghc,fmthoma/ghc,bitemyapp/ghc,green-haskell/ghc,sdiehl/ghc,gridaphobe/ghc,nathyong/microghc-ghc,AlexanderPankiv/ghc,shlevy/ghc,forked-upstream-packages-for-ghcjs/ghc,snoyberg/ghc,da-x/ghc,siddhanathan/ghc,christiaanb/ghc,AlexanderPankiv/ghc,gridaphobe/ghc,snoyberg/ghc,nathyong/microghc-ghc,TomMD/ghc,oldmanmike/ghc,nkaretnikov/ghc,siddhanathan/ghc,ml9951/ghc,elieux/ghc,nathyong/microghc-ghc,da-x/ghc,urbanslug/ghc,nushio3/ghc,spacekitteh/smcghc,jstolarek/ghc,ml9951/ghc,acowley/ghc,vikraman/ghc,christiaanb/ghc,vikraman/ghc,snoyberg/ghc,vTurbine/ghc,ryantm/ghc,nathyong/microghc-ghc,siddhanathan/ghc,da-x/ghc,elieux/ghc,GaloisInc/halvm-ghc,mfine/ghc,mettekou/ghc,gcampax/ghc,bitemyapp/ghc,GaloisInc/halvm-ghc,sdiehl/ghc,anton-dessiatov/ghc,wxwxwwxxx/ghc,TomMD/ghc,bitemyapp/ghc,jstolarek/ghc,TomMD/ghc,acowley/ghc,oldmanmike/ghc,fmthoma/ghc,holzensp/ghc,sdiehl/ghc,mcschroeder/ghc,elieux/ghc,oldmanmike/ghc,ml9951/ghc,tjakway/ghcjvm,green-haskell/ghc,GaloisInc/halvm-ghc,forked-upstream-packages-for-ghcjs/ghc,fmthoma/ghc,lukexi/ghc,tjakway/ghcjvm,oldmanmike/ghc,TomMD/ghc,AlexanderPankiv/ghc,christiaanb/ghc,mfine/ghc,spacekitteh/smcghc,sgillespie/ghc,gridaphobe/ghc,wxwxwwxxx/ghc,vikraman/ghc,wxwxwwxxx/ghc,acowley/ghc,frantisekfarka/ghc-dsi,ghc-android/ghc,TomMD/ghc,mfine/ghc,lukexi/ghc,gridaphobe/ghc,elieux/ghc,siddhanathan/ghc,ezyang/ghc,shlevy/ghc,ezyang/ghc,ghc-android/ghc,acowley/ghc,mfine/ghc,holzensp/ghc,gridaphobe/ghc,nathyong/microghc-ghc,sdiehl/ghc,green-haskell/ghc,mcschroeder/ghc,sgillespie/ghc,holzensp/ghc,gcampax/ghc,fmthoma/ghc,olsner/ghc,mettekou/ghc,GaloisInc/halvm-ghc,ryantm/ghc,olsner/ghc,vTurbine/ghc,sgillespie/ghc,sgillespie/ghc,mettekou/ghc,mcschroeder/ghc,jstolarek/ghc,tjakway/ghcjvm,siddhanathan/ghc,christiaanb/ghc,ml9951/ghc,lukexi/ghc,nkaretnikov/ghc,gridaphobe/ghc,green-haskell/ghc,mettekou/ghc,da-x/ghc,urbanslug/ghc,olsner/ghc,forked-upstream-packages-for-ghcjs/ghc,ryantm/ghc,anton-dessiatov/ghc,ghc-android/ghc,anton-dessiatov/ghc,nkaretnikov/ghc,lukexi/ghc,gcampax/ghc,vTurbine/ghc,christiaanb/ghc,christiaanb/ghc,acowley/ghc,vikraman/ghc,bitemyapp/ghc,vTurbine/ghc,mcschroeder/ghc,spacekitteh/smcghc,lukexi/ghc,elieux/ghc,spacekitteh/smcghc,frantisekfarka/ghc-dsi,mettekou/ghc,acowley/ghc,nkaretnikov/ghc,tibbe/ghc,gcampax/ghc,wxwxwwxxx/ghc,olsner/ghc,sgillespie/ghc,snoyberg/ghc,shlevy/ghc,vikraman/ghc,tibbe/ghc,forked-upstream-packages-for-ghcjs/ghc,wxwxwwxxx/ghc,holzensp/ghc,ml9951/ghc,shlevy/ghc,ghc-android/ghc,ml9951/ghc,nushio3/ghc,mettekou/ghc,mfine/ghc,sdiehl/ghc,nkaretnikov/ghc,tjakway/ghcjvm,jstolarek/ghc,nkaretnikov/ghc,TomMD/ghc,tjakway/ghcjvm,fmthoma/ghc,da-x/ghc,wxwxwwxxx/ghc,ezyang/ghc