Commit e53dcfd2 authored by Him188's avatar Him188

Improve performance

parent 0671fd9a
...@@ -197,9 +197,9 @@ open class LockFreeLinkedList<E> { ...@@ -197,9 +197,9 @@ open class LockFreeLinkedList<E> {
inline fun forEach(block: (E) -> Unit) { inline fun forEach(block: (E) -> Unit) {
var node: Node<E> = head var node: Node<E> = head
while (true) { while (true) {
if (node === tail) return
node.letValueIfValid(block) node.letValueIfValid(block)
node = node.nextNode node = node.nextNode
if (node === tail) return
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment