-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
I have a function written in JavaScript. I have created a callback in C++ as following:
void callbackFunction( int val ) {
try {
auto cb = (std::function<void(int val)>) context.eval("run");
cb(val);
}
catch {
...
}
}
I want to put callbackFunction() on a thread, std::thread(callbackFunction, val).detach()
. But this always end up with terminate called after throwing an instance of 'qjs::exception'
How can I use multithreading in quickjs? Is there any workaround?
Metadata
Metadata
Assignees
Labels
No labels