QuickJS is great! but it cannot set pause after JS_Call, maybe should export a new JS_TriggerInterruptHandler
API , then the C program can trigger the JSContext running state through a special JSInterruptHandler
, it's very useful when executing a large scripts.Would this be feasible?
void JS_TriggerInterruptHandler(JSContext *ctx)
{
ctx->interrupt_counter = 0;
}