MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / tryWriteLock

Method tryWriteLock

source/core/StarThread.cpp:46–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46bool ReadersWriterMutex::tryWriteLock() {
47 MutexLocker locker(m_mutex);
48 if (m_readers || m_writers)
49 return false;
50 m_writers = 1;
51 return true;
52}
53
54void ReadersWriterMutex::writeUnlock() {
55 MutexLocker locker(m_mutex);

Callers 1

tryLockMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected