QuickJS code is not thread-safe. You could not use the same JSContext
structure in two threads simultaneously.
On Thu, Jan 23, 2020 at 8:57 AM JM <jeevhi@xxxxxxxxx> wrote:
Consider the scenario,
Launched Thread 1 {
Create JSContext
Eval JavaScript
Save context somewhere
}
After sometime,
Launch Thread 2 {
retrieve context saved from Thread 1
Call some JS function using JSCall()
}
Since both the threads are not running simultaneously, I expected this to
work but it doesn't. Instead, JSCall() generates exception.
Any idea ?