You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental/internal/LockFreeLinkedList.kt
+46Lines changed: 46 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -189,6 +189,29 @@ public open class LockFreeLinkedListNode {
189
189
190
190
// ------ addXXX util ------
191
191
192
+
/**
193
+
* Given:
194
+
* ```
195
+
* +-----------------------+
196
+
* this | node V next
197
+
* +---+---+ +---+---+ +---+---+
198
+
* ... <-- | P | N | | P | N | | P | N | --> ....
199
+
* +---+---+ +---+---+ +---+---+
200
+
* ^ |
201
+
* +-----------------------+
202
+
* ```
203
+
* Produces:
204
+
* ```
205
+
* this node next
206
+
* +---+---+ +---+---+ +---+---+
207
+
* ... <-- | P | N | ==> | P | N | --> | P | N | --> ....
208
+
* +---+---+ +---+---+ +---+---+
209
+
* ^ | ^ |
210
+
* +---------+ +---------+
211
+
* ```
212
+
* Where `==>` denotes linearization point.
213
+
* Returns `false` if `next` was not following `this` node.
0 commit comments