forEachIfUnlocked

fun forEachIfUnlocked(execute: (listener: T) -> Unit)

iterate over the listeners only if isLocked is false.

the isLocked is true, the forEachIfUnlocked loop is ignored and returns immediately

Parameters

execute

a function to execute on each listener