"Julian Graham" <[EMAIL PROTECTED]> writes: >> 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. > > For join-thread, sure. What about scm_join_thread? Sorry if I'm > being obtuse, but my understanding was that you didn't want anything > like scm_join_thread_timed and that changing the signature of > scm_join_thread was out of the question. (Or should this enhancement > only be exposed in Scheme?)
Write scm_join_thread_timed(), which implements all the new behaviour. Map that to join-thread in Scheme - then that's still back compatible, because the added args are optional. Then rewrite scm_join_thread() as a trivial function that just calls scm_join_thread_timed(). See scm_catch_with_pre_unwind_handler() and scm_catch() in throw.c for a similar example. Does that sound OK to you? Regards, Neil