mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-02 14:30:13 +08:00
Improve performance
This commit is contained in:
parent
0671fd9abd
commit
e53dcfd26b
@ -197,9 +197,9 @@ open class LockFreeLinkedList<E> {
|
||||
inline fun forEach(block: (E) -> Unit) {
|
||||
var node: Node<E> = head
|
||||
while (true) {
|
||||
if (node === tail) return
|
||||
node.letValueIfValid(block)
|
||||
node = node.nextNode
|
||||
if (node === tail) return
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user