The patch doesn't compile for me:

compiler/hsSyn/Convert.lhs:373:22:
    Not in scope: data constructor `Interruptible'

One idea that occurred to me for bound threads: instead of pthread_cancel(), we could try pthread_kill() with a suitable signal, which should be enough to kick the thread out of a blocking system call and might return it to Haskell land where we can raise the exception.

Cheers,
        Simon

On 03/09/10 00:44, Edward Z. Yang wrote:
Thu Sep  2 19:39:29 EDT 2010  Edward Z. Yang<[email protected]>
   * Add support for interruptible FFI calls (version 2)

   This is the second version of a patch that adds support for
   interruptible FFI calls in the form of a new foreign import keyword
   'interruptible', which can be used instead of 'safe' or 'unsafe'.
   Interruptible FFI calls act like safe FFI calls, except that the worker
   thread they run on may be unceremoniously terminated.

   Internally, it replaces BlockedOnCCall_NoUnblockEx with
   BlockedOnCCall_Interruptible, and changes the behavior of the RTS
   to not modify the TSO_ flags on the event of an FFI call from
   a thread that was interruptible.  It also modifies the bytecode
   format for foreign call, adding an extra Word16 to indicate
   interruptibility.

   This patch is incomplete: it does not prevent interruptible FFI calls
   from being placed on bound threads or support Windows.  There is
   a partner testsuite patch which adds several tests for this
   functionality.



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to