mirror of
https://github.com/janet-lang/janet
synced 2025-11-20 17:24:48 +00:00
Add signal and fiber/can-resume?.
These additions, along with the change that user signals 0-4 cannot be resumed, allow delimited continuation semantics, while repsecting existing forms like `defer`, `with`, `with-vars`, etc.
This commit is contained in:
@@ -1249,6 +1249,7 @@ JanetSignal janet_continue(JanetFiber *fiber, Janet in, Janet *out) {
|
||||
}
|
||||
if (old_status == JANET_STATUS_ALIVE ||
|
||||
old_status == JANET_STATUS_DEAD ||
|
||||
(old_status >= JANET_STATUS_USER0 && old_status <= JANET_STATUS_USER4) ||
|
||||
old_status == JANET_STATUS_ERROR) {
|
||||
const uint8_t *str = janet_formatc("cannot resume fiber with status :%s",
|
||||
janet_status_names[old_status]);
|
||||
|
||||
Reference in New Issue
Block a user