Hi guys, While I was waiting to get my copyright assignment sorted out, I started trying to figure out what it would take to add SRFI-18 (http://srfi.schemers.org/srfi-18/srfi-18.html) support to Guile. I think a lot of it can be safely done in Scheme (mostly by mapping the SRFI's proposed API onto what's already in Guile), but there are a few things that'd require further modification to the C core. Specifically:
* Type predicates: thread?, mutex?, and condition-variable?. * Mutex state: This kind of needs to happen in C, since we need to hook the actual lock / unlock calls in order to record the state changes. * Mutex unlocking outside the owner thread: The existing implementation claims the result of doing this is undefined, but what it actually does is mark the mutex unlocked and then throw an exception. I don't really think there's a technical reason to prohibit this, especially since Guile doesn't use the pthreads mutex implementation directly. * Mutex lock timeout: Not really sure how to do this -- maybe add a pthreads condition variable to the definition of fat_mutex. Supporting this with the existing lock-mutex code would also require a breaking change to the C API, and I don't know what the conditions are (if any) under which that's acceptable. All this kind of presumes that SRFI-18 is something that the Guile maintainers care about supporting. Is it? I'm afraid I don't know the Guile project's attitude towards implementing SRFIs. Regards, Julian _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel