I'm trying to embed SpiderMonkey 24 into a multithreaded application. I
learned from the docs that if a JSNative function must wait for a long
task to complete, JS_SuspendRequest and JS_ResumeRequest must be called,
but in SpiderMonkey 24 these two functions were removed.
Can you please tell me what is the new way to allow other threads to
garbage collect when a long task is going to be run in a JSNative?
Thanks in advance,
dev-tech-js-engine mailing list
[hidden email] https://lists.mozilla.org/listinfo/dev-tech-js-engine
On 3/3/14 5:13 AM, Christian Comaschi wrote:
> Can you please tell me what is the new way to allow other threads to
> garbage collect when a long task is going to be run in a JSNative?
In Spidermonkey 24, you can only have one thread that's using a given
JSRuntime. Since GC is runtime-local, there is no way for GC to happen
on the JSRuntime of the blocked thread while it's blocked (though of
course if the long-running JSNative makes calls back into JSAPI those