
#8684: hWaitForInput cannot be interrupted by async exceptions on unix -------------------------------------+------------------------------------- Reporter: nh2 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Core Libraries | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: 13497, 13525 | Blocking: Related Tickets: #12912, #13525 | Differential Rev(s): Phab:D42 Wiki Page: | -------------------------------------+------------------------------------- Comment (by nh2): Hmm, `interruptible yield` would be a workaround, but I think it wouldn't fix the key problem. It would fix only `hWaitForInput`/`ready`. But it looks like other safe foreign calls that are called in a tight loop that does not allocate cannot be `timeout`ed. It seems a proper solution would be to insert a `yield` right after /any/ foreign call returns (at least in the non-threaded RTS). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8684#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler