mirror of
https://github.com/janet-lang/janet
synced 2025-09-02 19:08:04 +00:00
Can only enter pending threads.
This commit is contained in:
@@ -363,9 +363,8 @@ int gst_continue(Gst *vm) {
|
||||
temp = gst_wrap_thread(vm->thread->parent);
|
||||
}
|
||||
if (temp.type == GST_THREAD) {
|
||||
if (temp.data.thread->status == GST_THREAD_DEAD ||
|
||||
temp.data.thread->status == GST_THREAD_ERROR)
|
||||
gst_error(vm, "cannot enter dead thread");
|
||||
if (temp.data.thread->status != GST_THREAD_PENDING)
|
||||
gst_error(vm, "can only enter pending thread");
|
||||
}
|
||||
gst_frame_ret(stack) = pc[1];
|
||||
vm->thread->status = GST_THREAD_PENDING;
|
||||
|
@@ -104,4 +104,5 @@
|
||||
|
||||
# report
|
||||
|
||||
(print num-tests-passed " of " num-tests-run " tests passed")
|
||||
(print "\n" num-tests-passed " of " num-tests-run " tests passed\n")
|
||||
(if (not (= num-tests-passed num-tests-run)) (exit! 1))
|
Reference in New Issue
Block a user