1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-03-02 14:30:13 +08:00

Improve performance

This commit is contained in:
Him188 2020-02-06 11:12:29 +08:00
parent 0671fd9abd
commit e53dcfd26b

View File

@ -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
}
}