Skip to content

Commit 6619690

Browse files
committed
Fix comment
1 parent 8f069e9 commit 6619690

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kotlinx-coroutines-core/common/src/internal/SegmentList.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ package kotlinx.coroutines.internal
77
import kotlinx.atomicfu.*
88
import kotlinx.coroutines.*
99

10-
// returns the first segment `s` with `s.id >= id` or `CLOSED` if all the segments in this linked list have lower `id`
11-
//// and the list is closed for further segment additions.
10+
// returns the first segment `s` with `s.id >= id` or `CLOSED`
11+
// if all the segments in this linked list have lower `id` and the list is closed for further segment additions.
1212
private inline fun <S: Segment<S>> S.findSegmentInternal(id: Long, createNewSegment: (id: Long, prev: S?) -> S): SegmentOrClosed<S> {
1313
// Go through `next` references and add new segments if needed,
1414
// similarly to the `push` in the Michael-Scott queue algorithm.
1515
// The only difference is that `CAS failure` means that the
1616
// required segment has already been added, so the algorithm just
17-
// uses it. This way, only one segment with each id can be in the queue.
17+
// uses it. This way, only one segment with each id can be added.
1818
var cur: S = this
1919
while (cur.id < id || cur.removed) {
2020
val nextOrClosed = cur.nextOrClosed

0 commit comments

Comments
 (0)