| ||||||
SummaryIndicates to the JS engine that an application thread is leaving a critical section that calls the JS API freely but does not block. | ||||||
Syntaxvoid JS_EndRequest(JSContext *cx); | ||||||
DescriptionWhen your multi-threaded application has calledJS_BeginRequest and no longer needs to call the JS API in a non-blocking burst of activity, JS_EndRequest safely decrements the request counter for the JS engine runtime associated with a given context, cx . If decrementing the counter reduces it to zero, JS_EndRequest locks the runtime and notifies the garbage collector so that values no longer in use can be cleaned up.
The application may nest calls to
| ||||||
NotesJS_EndRequest is available only if you compile the JS engine with JS_THREADSAFE defined. In a default engine compilation, JS_THREADSAFE is undefined.
| ||||||
See Also
|