[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/07: Thread prepare-to-wait respects block_asyncs
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/07: Thread prepare-to-wait respects block_asyncs |
Date: |
Sun, 8 Jan 2017 14:51:35 +0000 (UTC) |
wingo pushed a commit to branch master
in repository guile.
commit 5241d0685586f34055dae23fedc46134e2171865
Author: Andy Wingo <address@hidden>
Date: Sun Jan 8 12:24:44 2017 +0100
Thread prepare-to-wait respects block_asyncs
* libguile/async.c (scm_i_prepare_to_wait): Don't signal interrupt if
asyncs are blocked.
---
libguile/async.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libguile/async.c b/libguile/async.c
index 7b3ccb8..fc03078 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);
}
- [Guile-commits] branch master updated (a0656ad -> b392d81), Andy Wingo, 2017/01/08
- [Guile-commits] 02/07: Remove thread-exited? check in sigaction, Andy Wingo, 2017/01/08
- [Guile-commits] 01/07: Thread prepare-to-wait respects block_asyncs,
Andy Wingo <=
- [Guile-commits] 03/07: Remove thread-specific admin mutex, Andy Wingo, 2017/01/08
- [Guile-commits] 04/07: Enable interrupts only when running thread body, Andy Wingo, 2017/01/08
- [Guile-commits] 06/07: Exited threads retain less memory, Andy Wingo, 2017/01/08
- [Guile-commits] 05/07: Prevent some interrupts of wait-condition-variable, Andy Wingo, 2017/01/08
- [Guile-commits] 07/07: Fix close-port race., Andy Wingo, 2017/01/08