> At any rate, let me pop a few frames off the stack. The two remaining > changes for the core features patch were providing a join_thread that > could indicate a timeout without throwing an SRFI-18 exception; and > providing a well-defined fat_mutex_lock that doesn't rely on the > SRFI-18 notion of mutex state. Two questions: > > * What would be an appropriate way for join_thread to indicate a > timeout? Given that it's a primitive that can be called from Guile, I > take it that the standard C approach of passing a pointer to a flag is > out of the question. Would it be good enough to have it return #f on > timeout (even if that leaves some amiguity about whether there was a > timeout or just a lack of a thread return value)? Is there a core > exception it could throw? How about if the core join-thread takes an optional timeout-val parameter, like SRFI-18 thread-join! ? If no timeout-val was supplied, and the join timed out, the core join-thread would return #f. The #f would indeed be ambiguous, but any given caller can eliminate the ambiguity if they choose to by specifying a timeout-val. Note that thread-join! can map onto this, in the case where _it_ gets no timeout-val, by constructing a unique object such as (list 'timeout) and passing this as the timeout-val to the core join-thread. > * What should be the behavior of fat_mutex_lock when attempting to > lock an abandoned mutex -- in your earlier email, you seemed amenable > to the parts of SRFI-18 that shore up some of the poorly-defined > threading behavior in core threads. So should locking an abandoned > mutex be an error? If so, what kind? Or should locking an abandoned > mutex not be an error at all unless you do it using the SRFI-18 API? I'll get back to you on this one tomorrow! Regards, Neil