Re: Signal handler scheduling on single-threaded RTS

2010-11-15 Thread Edward Z. Yang
Oh, there's quite a simple fix for this: don't have the FFI call handle the SIGINT; only handle a signal the RTS generates. I guess we should do a little more legwork to make sure interruptible(?) user threads don't see signals. Edward ___ Glasgow-haske

Re: Signal handler scheduling on single-threaded RTS

2010-11-11 Thread Edward Z. Yang
Relatedly, it seems that it takes a nontrivial amount of time for the multithreaded RTS to "realize" that a thread has emitted a signal. I wonder if there's a more direct way an FFI call can say "when I get back to Haskell, immediately start propagating an exception." Edward _

Signal handler scheduling on single-threaded RTS

2010-11-10 Thread Edward Z. Yang
I've been poking the bad behavior Brian described here: http://blog.ezyang.com/2010/08/interrupting-ghc/comment-page-1/#comment-1334 and in the process noticed something kind of interesting about thread scheduling in non-multithreaded mode (i.e. without -threaded). When the single-threaded R