mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-14 08:27:34 +02:00
If the only available thread is paused and we need to schedule it, remove it from the paused list.
Fixes issue #138 - otherwise the thread can be revived in the repl after we sleep.
This commit is contained in:
parent
736ff434e6
commit
51c12f6115
1 changed files with 2 additions and 0 deletions
|
@ -547,6 +547,8 @@ sexp sexp_scheduler (sexp ctx, sexp self, sexp_sint_t n, sexp root_thread) {
|
|||
sexp_global(ctx, SEXP_G_THREADS_PAUSED) = sexp_cdr(paused);
|
||||
if (sexp_not(sexp_memq(ctx, tmp, paused)))
|
||||
sexp_insert_timed(ctx, tmp, tmp);
|
||||
} else {
|
||||
sexp_delete_list(ctx, SEXP_G_THREADS_PAUSED, res);
|
||||
}
|
||||
usecs = 0;
|
||||
if ((sexp_context_timeval(res).tv_sec == 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue