[webkit-dev] Removing ENABLE_SINGLE_THREADED and ENABLE_JSC_MULTIPLE_THREADS

Geoffrey Garen ggaren at apple.com
Wed Sep 14 12:45:10 PDT 2011


> From what I understand, HTML5 Web Worker doesn't rely on threaded GC
> because each worker thread has its own heap.

That's the current implementation, yes. (But we may be able to do something more efficient if we allow workers to rely on threaded GC.)

> The other place affected
> by ENABLE_JSC_MULTIPLE_THREADS is JSLock. However it is also said
> platforms other than MacOS doesn't need to implement JSLock.

I think it's more accurate to say that platforms willing to crash if you use the JS API from multiple threads without explicit locking do not need to implement JSLock. (Of course, I'm trying to change that so the threading behavior of the JS API is consistent across all platforms. This is a key first step toward evolving the threading model in JSC.)

Another feature currently guarded by ENABLE_JSC_MULTIPLE_THREADS is lazy block freeing in the heap.

> It seems
> the only use of ENABLE_JSC_MULTIPLE_THREADS is to use JS API from
> another thread. Is this correct?

Not quite.

Also, bear in mind that I'm talking about the set of ENABLE_SINGLE_THREADED, ENABLE_JSC_MULTIPLE_THREADS, and ENABLE_WTF_MULTIPLE_THREADS.

Geoff


More information about the webkit-dev mailing list