Skip to content

Commit 2d04e25

Browse files
committed
Simplify unused parts of the ReentrantLock KMP interface.
1 parent 623be54 commit 2d04e25

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/guts/AtomicFuBroken.kt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2024 DiffPlug
2+
* Copyright (C) 2024-2025 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,12 +24,8 @@ expect class AtomicRef<T> {
2424
/** Replace with atomicfu when stable. */
2525
expect fun <T> atomic(initial: T): AtomicRef<T>
2626

27-
expect fun reentrantLock(): ReentrantLock
27+
expect class ReentrantLock
2828

29-
expect class ReentrantLock {
30-
fun lock(): Unit
31-
fun tryLock(): Boolean
32-
fun unlock(): Unit
33-
}
29+
expect fun reentrantLock(): ReentrantLock
3430

3531
expect inline fun <T> ReentrantLock.withLock(block: () -> T): T

0 commit comments

Comments
 (0)