Skip to content

Commit 7a35ef7

Browse files
committed
Add comment
1 parent 464a124 commit 7a35ef7

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

atomicfu/src/jvmTest/kotlin/kotlinx/atomicfu/locks/NativeMutexLincheckReentrantTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ class NativeMutexLincheckReentrantTest {
1818

1919
private val counter = Counter()
2020
private val localParkers = ConcurrentHashMap<ParkingHandle, ThreadParker>()
21-
21+
22+
// Lazy prevents rare issue with lincheck not finding lambdas
2223
private val lock by lazy {
2324
NativeMutex(
2425
park = { localParkers[ParkingSupport.currentThreadHandle()]!!.park() },

atomicfu/src/jvmTest/kotlin/kotlinx/atomicfu/locks/NativeMutexLincheckTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class NativeMutexLincheckTest {
1919
private val counter = Counter()
2020
private val localParkers = ConcurrentHashMap<ParkingHandle, ThreadParker>()
2121

22+
// Lazy prevents rare issue with lincheck not finding lambdas
2223
private val lock by lazy {
2324
NativeMutex(
2425
park = { localParkers[ParkingSupport.currentThreadHandle()]!!.park() },

atomicfu/src/jvmTest/kotlin/kotlinx/atomicfu/locks/NativeMutexTimeoutLincheckTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class NativeMutexTimeoutLincheckTest {
2020
private val counter = Counter()
2121
private val localParkers = ConcurrentHashMap<ParkingHandle, ThreadParker>()
2222

23+
// Lazy prevents rare issue with lincheck not finding lambdas
2324
private val lock by lazy {
2425
NativeMutex(
2526
park = { localParkers[ParkingSupport.currentThreadHandle()]!!.parkNanos(it.inWholeNanoseconds) },

0 commit comments

Comments
 (0)