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 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.
@@ -29,12 +29,7 @@ actual class AtomicRef<T>(private var value: T) {
2929 }
3030}
3131val Lock = ReentrantLock ()
32- actual inline fun reentrantLock () = Lock
32+ actual fun reentrantLock () = Lock
3333
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
4035actual inline fun <T > ReentrantLock.withLock (block : () -> T ) = block()
Original file line number Diff line number Diff line change 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,7 +24,7 @@ actual class AtomicRef<T>(value: T) {
2424 actual fun updateAndGet (update : (T ) -> T ): T = ref.updateAndGet(update)
2525 actual fun getAndUpdate (update : (T ) -> T ) = ref.getAndUpdate(update)
2626}
27- actual inline fun reentrantLock () = ReentrantLock ()
27+ actual fun reentrantLock () = ReentrantLock ()
2828
2929actual typealias ReentrantLock = java.util.concurrent.locks.ReentrantLock
3030actual inline fun <T > ReentrantLock.withLock (block : () -> T ): T {
You can’t perform that action at this time.
0 commit comments