Browse Source
* WebAssembly threads: fixed race condition LockMutex in the check where Locked
is 1, but Owner still holds the current thread id, even though another thread
has just acquired a lock, but still haven't updated the owner thread ID. We
avoid this problem by setting Owner to nil before unlocking the mutex. And in
InitMutex/DoneMutex, we store the creator thread ID in a different field -
Creator, instead of Owner.