add SmartKeyRWLocker.withWriteLocks extension with vararg keys

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

View File

@@ -2,6 +2,9 @@
## 0.25.4
* `Coroutines`:
* Add `SmartKeyRWLocker.withWriteLocks` extension with vararg keys
## 0.25.3
* `Coroutines`:

View File

@@ -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)