mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-09-07 17:19:32 +00:00
fixes in SmartRWLocker
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
## 0.20.5
|
||||
|
||||
* `Coroutines`:
|
||||
* Fixes in `SmartRWLocker`
|
||||
|
||||
## 0.20.4
|
||||
|
||||
* `Versions`:
|
||||
|
@@ -37,8 +37,8 @@ class SmartRWLocker(private val readPermits: Int = Int.MAX_VALUE, writeIsLocked:
|
||||
* Locking [writeMutex] and wait while all [readSemaphore] permits will be freed
|
||||
*/
|
||||
suspend fun lockWrite() {
|
||||
_readSemaphore.acquire(readPermits)
|
||||
_writeMutex.lock()
|
||||
_readSemaphore.acquire(readPermits)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user