synchronized

fun <T> synchronized(action: MutableIterator<E>.() -> T): T

Synchronizes an action block on the MutableIterator

Return

The result of the action block

Parameters

action

The action block to execute concurrently