mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
Enable interrupts only when running thread body
* libguile/threads.c (really_launch): Start threads with asyncs blocked. * module/ice-9/threads.scm (call-with-new-thread): Unblock asyncs once we have the bookkeeping sorted out. Don't use with-continuation-barrier; it's not needed. Print nice thread backtraces.
This commit is contained in:
parent
78239acff6
commit
a000e5c38d
2 changed files with 29 additions and 12 deletions
|
@ -732,6 +732,9 @@ typedef struct {
|
|||
static void *
|
||||
really_launch (void *d)
|
||||
{
|
||||
scm_i_thread *t = SCM_I_CURRENT_THREAD;
|
||||
/* The thread starts with asyncs blocked. */
|
||||
t->block_asyncs++;
|
||||
SCM_I_CURRENT_THREAD->result = scm_call_0 (((launch_data *)d)->thunk);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue