
On 06/09/10 19:16, Edward Z. Yang wrote:
Excerpts from Simon Marlow's message of Mon Sep 06 05:57:59 -0400 2010:
What did you have in mind with respect to "portable equivalents of pthread functions"? I'm not sure we need to do anything along these lines at all, and I'd much rather we didn't enforce any threading abstraction on foreign clients.
My thought here is that we want interruptible FFI code to be able to say when it’s entering critical sections in a platform independent way, and if it uses pthread functions to this effect, it is then tied to POSIX. Something more portable would be for the program to tie itself to our OS threading library OSThreads.c
Maybe. As a first step I think we could just document what happens when a call is interrupted (pthread_cancel() on POSIX, ??? on Windows) and let the user handle it. Is there even a good lowest-common-denominator that we can build an API on top of? Cheers, Simon