diff options
author | Andy Wingo <wingo@pobox.com> | 2017-01-08 12:24:44 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-01-08 12:24:44 +0100 |
commit | 5241d0685586f34055dae23fedc46134e2171865 (patch) | |
tree | 915e791a03d8bae7a6b7f96ca48a731e08cffe4e /libguile/async.c | |
parent | a0656ad4cf976b3845e9b9663a90b46b4cf9fc5a (diff) | |
download | guile-5241d0685586f34055dae23fedc46134e2171865.tar.gz |
Thread prepare-to-wait respects block_asyncs
* libguile/async.c (scm_i_prepare_to_wait): Don't signal interrupt if
asyncs are blocked.
Diffstat (limited to 'libguile/async.c')
-rw-r--r-- | libguile/async.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libguile/async.c b/libguile/async.c index 7b3ccb850..fc03078e7 100644 --- a/libguile/async.c +++ b/libguile/async.c @@ -165,6 +165,9 @@ int scm_i_prepare_to_wait (scm_i_thread *t, struct scm_thread_wake_data *wake) { + if (t->block_asyncs) + return 0; + scm_atomic_set_pointer ((void **)&t->wake, wake); /* If no interrupt was registered in the meantime, then any future @@ -246,8 +249,6 @@ SCM_DEFINE (scm_system_async_mark_for_thread, "system-async-mark", 1, 1, 0, else { SCM_VALIDATE_THREAD (2, thread); - if (scm_c_thread_exited_p (thread)) - SCM_MISC_ERROR ("thread has already exited", SCM_EOL); t = SCM_I_THREAD_DATA (thread); } |