mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 17:20:29 +02:00
Thread prepare-to-wait respects block_asyncs
* libguile/async.c (scm_i_prepare_to_wait): Don't signal interrupt if asyncs are blocked.
This commit is contained in:
parent
a0656ad4cf
commit
5241d06855
1 changed files with 3 additions and 2 deletions
|
@ -165,6 +165,9 @@ int
|
||||||
scm_i_prepare_to_wait (scm_i_thread *t,
|
scm_i_prepare_to_wait (scm_i_thread *t,
|
||||||
struct scm_thread_wake_data *wake)
|
struct scm_thread_wake_data *wake)
|
||||||
{
|
{
|
||||||
|
if (t->block_asyncs)
|
||||||
|
return 0;
|
||||||
|
|
||||||
scm_atomic_set_pointer ((void **)&t->wake, wake);
|
scm_atomic_set_pointer ((void **)&t->wake, wake);
|
||||||
|
|
||||||
/* If no interrupt was registered in the meantime, then any future
|
/* 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
|
else
|
||||||
{
|
{
|
||||||
SCM_VALIDATE_THREAD (2, thread);
|
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);
|
t = SCM_I_THREAD_DATA (thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue