File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
jsMain/kotlin/com/diffplug/selfie/guts
jvmMain/kotlin/com/diffplug/selfie/guts Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (C) 2024 DiffPlug
2
+ * Copyright (C) 2024-2025 DiffPlug
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -29,12 +29,7 @@ actual class AtomicRef<T>(private var value: T) {
29
29
}
30
30
}
31
31
val Lock = ReentrantLock ()
32
- actual inline fun reentrantLock () = Lock
32
+ actual fun reentrantLock () = Lock
33
33
34
- @Suppress(" NOTHING_TO_INLINE" )
35
- actual class ReentrantLock {
36
- actual inline fun lock (): Unit {}
37
- actual inline fun tryLock () = true
38
- actual inline fun unlock (): Unit {}
39
- }
34
+ @Suppress(" NOTHING_TO_INLINE" ) actual class ReentrantLock
40
35
actual inline fun <T > ReentrantLock.withLock (block : () -> T ) = block()
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (C) 2024 DiffPlug
2
+ * Copyright (C) 2024-2025 DiffPlug
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@ actual class AtomicRef<T>(value: T) {
24
24
actual fun updateAndGet (update : (T ) -> T ): T = ref.updateAndGet(update)
25
25
actual fun getAndUpdate (update : (T ) -> T ) = ref.getAndUpdate(update)
26
26
}
27
- actual inline fun reentrantLock () = ReentrantLock ()
27
+ actual fun reentrantLock () = ReentrantLock ()
28
28
29
29
actual typealias ReentrantLock = java.util.concurrent.locks.ReentrantLock
30
30
actual inline fun <T > ReentrantLock.withLock (block : () -> T ): T {
You can’t perform that action at this time.
0 commit comments