We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c12b9b commit 0c7a912Copy full SHA for 0c7a912
util/src/commonMain/kotlin/Flags.kt
@@ -54,9 +54,11 @@ public inline fun Flag.ifSet(block: () -> Unit) {
54
* If this [Flag] is not set, executes the given [action],
55
* and if it succeeds, [set]s the flag.
56
*
57
+ * This function is not thread-safe.
58
+ * Use [setWithLock] instead if you don't want [action] to execute twice.
59
+ *
60
* @return the thrown exception, if any.
61
* @since 0.0.1-alpha.4
- * @see setWithLock
62
*/
63
@OptIn(ExperimentalContracts::class)
64
public inline fun Flag.set(action: () -> Unit): Throwable? {
0 commit comments