semaphoreGuard

inline fun <E> Task<E>.semaphoreGuard(name: String? = null, task: Task<E>? = null, init: SemaphoreGuard<E>.() -> Unit = {}): Int

Creates and adds a SemaphoreGuard to the receiver Task.

Return

the index where the SemaphoreGuard has been added.

Parameters

name

the semaphore name.

task

the task to add to the SemaphoreGuard.

init

an optional inline block to configure the SemaphoreGuard.

Type Parameters

E

the type of the receiving task's blackboard.