skrypton-api / com.waicool20.skrypton.sikulix.input / SKryptonKeyboard / atomicAction

atomicAction

@Synchronized inline fun <T> atomicAction(action: () -> T): T

Executes an action atomically while keeping the synchronized lock to this object. Useful if you want to do multiple actions in one go without the possibility of a thread stealing ownership.

Parameters

action - Action to execute while keeping the lock this object.

Return
Result of action