File tree 1 file changed +3
-3
lines changed
kotlinx-coroutines-core/common/src/internal
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ package kotlinx.coroutines.internal
7
7
import kotlinx.atomicfu.*
8
8
import kotlinx.coroutines.*
9
9
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.
12
12
private inline fun <S : Segment <S >> S.findSegmentInternal (id : Long , createNewSegment : (id: Long , prev: S ? ) -> S ): SegmentOrClosed <S > {
13
13
// Go through `next` references and add new segments if needed,
14
14
// similarly to the `push` in the Michael-Scott queue algorithm.
15
15
// The only difference is that `CAS failure` means that the
16
16
// 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 .
18
18
var cur: S = this
19
19
while (cur.id < id || cur.removed) {
20
20
val nextOrClosed = cur.nextOrClosed
You can’t perform that action at this time.
0 commit comments