fix racy assert in SharedMutex