[webkit-dev] VM::setExclusiveThread()

Mark Lam mark.lam at apple.com
Fri Feb 24 20:50:11 PST 2017

The JSC VM has this method setExclusiveThread().  Some details:
1. setExclusiveThread() is only used to forego actually locking/unlocking the underlying lock inside JSLock.
2. setExclusiveThread() is only used by WebCore where we can guarantee that the VM will only ever be used exclusively on one thread.
3. the underlying lock inside JSLock used to be a slow system lock.

Now that we have fast locking, I propose that we simplify the JSLock code by removing the concept of the exclusiveThread and always lock/unlock the underlying lock.  This also give us the ability to tryLock the JSLock (something I would like to be able to do for something new I’m working on).

Does anyone see a reason why we can’t remove the concept of the exclusiveThread?



More information about the webkit-dev mailing list