useNewToken

suspend fun <R> useNewToken(block: suspend (T) -> R): R

Creates an new token and calls block with the token as lambda argument. The entry associated to the token, if any, is removed from the map afterwards.

Return

The value returned by block.

Parameters

R

The return value type of block.