synchronized

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

Synchronizes an action block on the MutableSet

Return

The result of the action block

Parameters

action

The action block to execute concurrently