From 6687008d1a8a7cccf91960f969e8d7bcd8c7caf2 Mon Sep 17 00:00:00 2001 From: John Alanbrook Date: Fri, 6 Jun 2025 10:46:16 -0500 Subject: [PATCH] closes #14 --- source/qjs_actor.c | 4 ++++ tests/unneeded.ce | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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);