diff options
author | Mark H Weaver <mhw@netris.org> | 2013-06-10 02:05:17 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2013-06-10 02:34:21 -0400 |
commit | 2a1d8403c07704a40279e58373e6605e0c1f6dd7 (patch) | |
tree | e8c85b3e823489508c3fe8adfbf1c31a26a085fb /libguile/threads.c | |
parent | 8b12a34c8f13d9b2917ffbecc5d59151e5d38a5b (diff) | |
download | guile-2a1d8403c07704a40279e58373e6605e0c1f6dd7.tar.gz |
Allow #f as timeout argument to unlock-mutex and SRFI-18 mutex-unlock!
Reported by Chaos Eternal <chaoseternal@shlug.org>
Based on a patch by Nala Ginrut <nalaginrut@gmail.com>
* libguile/threads.c (scm_unlock_mutex_timed): If 'timeout' argument
is false, interpret that as no timeout.
* doc/ref/api-scheduling.texi (Mutexes and Condition Variables):
Update documentation.
Diffstat (limited to 'libguile/threads.c')
-rw-r--r-- | libguile/threads.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/threads.c b/libguile/threads.c index 04897e383..c5947915e 100644 --- a/libguile/threads.c +++ b/libguile/threads.c @@ -1696,7 +1696,7 @@ SCM_DEFINE (scm_unlock_mutex_timed, "unlock-mutex", 1, 2, 0, { SCM_VALIDATE_CONDVAR (2, cond); - if (! (SCM_UNBNDP (timeout))) + if (! SCM_UNBNDP (timeout) && ! scm_is_false (timeout)) { to_timespec (timeout, &cwaittime); waittime = &cwaittime; |