You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
I have a function written in JavaScript. I have created a callback in C++ as following:
I want to put callbackFunction() on a thread,
std::thread(callbackFunction, val).detach()
. But this always end up withterminate called after throwing an instance of 'qjs::exception'
How can I use multithreading in quickjs? Is there any workaround?
The text was updated successfully, but these errors were encountered: