- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for tryLock (0.28 sec)
-
src/sync/rwmutex.go
} } // TryLock tries to lock rw for writing and reports whether it succeeded. // // Note that while correct uses of TryLock do exist, they are rare, // and use of TryLock is often a sign of a deeper problem // in a particular use of mutexes. func (rw *RWMutex) TryLock() bool { if race.Enabled { _ = rw.w.state race.Disable() } if !rw.w.TryLock() { if race.Enabled { race.Enable()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 7.2K bytes - Viewed (0) -
src/sync/mutex.go
} // Slow path (outlined so that the fast path can be inlined) m.lockSlow() } // TryLock tries to lock m and reports whether it succeeded. // // Note that while correct uses of TryLock do exist, they are rare, // and use of TryLock is often a sign of a deeper problem // in a particular use of mutexes. func (m *Mutex) TryLock() bool { old := m.state if old&(mutexLocked|mutexStarving) != 0 { return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 8.4K bytes - Viewed (0)