You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may lead to deadlocks if another goroutine acquires a RWLock in the meantime. The rwmutex documentation clearly explains that pitfall:
If any goroutine calls RWMutex.Lock while the lock is already held by one or more readers,
concurrent calls to RWMutex.RLock will block until the writer has acquired (and released) the lock,
to ensure that the lock eventually becomes available to the writer. Note that this prohibits
recursive read-locking. A RWMutex.RLock cannot be upgraded into a RWMutex.Lock, nor can a
RWMutex.Lock be downgraded into a RWMutex.RLock.
It should not be used for recursive read locking; a blocked Lock
call excludes new readers from acquiring the lock. See the
documentation on the [RWMutex] type.
The text was updated successfully, but these errors were encountered:
Calling OrderedWalk alongside with other dag operations may lead to deadlock as described in this issue
OrderedWalk acquires an RLock and calls GetParents that is also acquiring an RLock.
This may lead to deadlocks if another goroutine acquires a RWLock in the meantime. The rwmutex documentation clearly explains that pitfall:
Rlock function doc also explicitely stands that:
The text was updated successfully, but these errors were encountered: