Subj : Re: Newbie question. GC or memory managment. To : netscape.public.mozilla.jseng From : Brendan Eich Date : Fri Aug 27 2004 01:54 pm J.P. wrote: > In my code, I have multiple threads sharing the same runtime. Each > thread has his own contexts. > > Do I need to compile the JS engine with JS_THREADSAFE defined? Yes. > Do I need > to use JS_BeginRequest and JS_EndRequest to bracket the JS API calls in > each thread? Yes. Bracket batches of calls made from your own non-blocking code. Of course you don't need to begin and end requests within your own native functions, getters, setters, etc. that the engine calls (JSClass hooks, JSNative functions). /be .