mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 23:50:19 +02:00
Recursively locking a SRFI-18 mutex blocks
* libguile/threads.c (fat_mutex_lock): allow-external-unlock mutexes can't be recursive, but a recursive lock attempt can be unblocked by an external thread, so these mutexes shouldn't throw an error on recursive lock attempts. * test-suite/tests/srfi-18.test: Add tests.
This commit is contained in:
parent
b43f11469a
commit
f1f68fffb1
2 changed files with 36 additions and 1 deletions
|
@ -1152,7 +1152,7 @@ fat_mutex_lock (SCM mutex, scm_t_timespec *timeout, int *ret)
|
|||
*ret = 1;
|
||||
break;
|
||||
}
|
||||
else if (scm_is_eq (m->owner, new_owner))
|
||||
else if (scm_is_eq (m->owner, new_owner) && !m->allow_external_unlock)
|
||||
{
|
||||
if (m->recursive)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue