Skip to content

Commit b78fa42

Browse files
committed
trivial rename of private method (for better readability)
1 parent 907074f commit b78fa42

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental/internal/LockFreeLinkedList.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public open class LockFreeLinkedListNode {
129129
if (prev is Removed) return prev
130130
prev as Node // otherwise, it can be only node otherwise
131131
if (prev.next === this) return prev
132-
helpInsert(prev, null)
132+
correctPrev(prev, null)
133133
}
134134
}
135135

@@ -314,7 +314,7 @@ public open class LockFreeLinkedListNode {
314314
continue
315315
}
316316
// linked improperly -- help insert
317-
queue.helpInsert(prev, op)
317+
queue.correctPrev(prev, op)
318318
}
319319
}
320320

@@ -468,7 +468,7 @@ public open class LockFreeLinkedListNode {
468468
if (PREV.compareAndSet(next, nextPrev, this)) {
469469
if (this.next is Removed) {
470470
// already removed
471-
next.helpInsert(nextPrev as Node, null)
471+
next.correctPrev(nextPrev as Node, null)
472472
}
473473
return
474474
}
@@ -477,7 +477,7 @@ public open class LockFreeLinkedListNode {
477477

478478
private fun finishRemove(next: Node) {
479479
helpDelete()
480-
next.helpInsert(_prev.unwrap(), null)
480+
next.correctPrev(_prev.unwrap(), null)
481481
}
482482

483483
private fun markPrev(): Node {
@@ -528,7 +528,7 @@ public open class LockFreeLinkedListNode {
528528
}
529529

530530
// fixes prev links from this node
531-
private fun helpInsert(_prev: Node, op: OpDescriptor?) {
531+
private fun correctPrev(_prev: Node, op: OpDescriptor?) {
532532
var prev: Node = _prev
533533
var last: Node? = null // will be set so that last.next === prev
534534
while (true) {

0 commit comments

Comments
 (0)