add SmartKeyRWLocker.withWriteLocks extension with vararg keys

This commit is contained in:
InsanusMokrassar committed 2025-03-27 20:54:41 +06:00
1 parent 7339dd8354
commit 26650e9b6c
2 files changed
+6 -1

No files matched your search

+3
View File
@@ -2,6 +2,9 @@
## 0.25.4
* `Coroutines`:
* Add `SmartKeyRWLocker.withWriteLocks` extension with vararg keys
## 0.25.3
* `Coroutines`:
@@ -221,4 +221,6 @@ suspend inline fun <T, R> SmartKeyRWLocker<T>.withWriteLocks(keys: Iterable<T>,
unlockWrite(it)
}
}
}
}
suspend inline fun <T, R> SmartKeyRWLocker<T>.withWriteLocks(vararg keys: T, action: () -> R): R = withWriteLocks(keys.asIterable(), action)