tryAcquire

abstract fun tryAcquire(): Boolean(source)

Tries to acquire a permit from this semaphore without suspension.

Return

true if a permit was acquired, false otherwise.