Skip to content
  • Simon Marlow's avatar
    Fix #2363: getChar cannot be interrupted with -threaded · 0eacb96e
    Simon Marlow authored
    Now in -threaded mode, instead of just making a blocking call to
    read(), we call select() first to make sure the read() won't block,
    and if it would block, then we use threadWaitRead.
    
    The idea is that the current thread must be interruptible while it
    blocks.  This is a little slower than before, but the overhead only
    applies to blocking Handles (stdin/stdout/stderr, and those created by
    System.Process).
    0eacb96e