unlockShared method
void
unlockShared()
Releases a shared lock.
If the caller is the last user having aquired a shared lock, this will resume the first existing user having requested for aquireing the exclusive lock.
Implementation
void unlockShared() {
_sharedCount--;
if (_sharedCount == 0) {
_shared.complete();
if (_waitingQueue.isNotEmpty && !_isLocked) {
_waitingQueue[0].complete();
}
}
}