diff --git a/source/qjs_actor.c b/source/qjs_actor.c index ea0df91a..512e37bd 100644 --- a/source/qjs_actor.c +++ b/source/qjs_actor.c @@ -74,6 +74,10 @@ JSValue actor2js(JSContext *js, cell_rt *actor) } JSC_CCALL(os_createactor, + cell_rt *rt = JS_GetContextOpaque(js); + if (rt->disrupt) + return JS_ThrowInternalError(js, "Can't start a new actor while disrupting."); + void *startup = value2wota(js, argv[0], JS_UNDEFINED); create_actor(startup); ) diff --git a/tests/unneeded.ce b/tests/unneeded.ce index bad30692..c463bf9f 100644 --- a/tests/unneeded.ce +++ b/tests/unneeded.ce @@ -1,4 +1,4 @@ $_.unneeded(_ => { log.console("Unneded function fired."); - $_.unneeded($_.stop, 1); + $_.start(undefined, "unneeded") }, 1);