1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-25 07:50:27 +00:00

Can only enter pending threads.

This commit is contained in:
bakpakin 2017-07-03 16:15:16 -04:00
parent 70efcc336b
commit eeeb660120
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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))