final
class
Semaphore extends Serializable
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
available: UIO[Long]
-
def
clone(): AnyRef
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
withPermit[R, E, A](task: ZIO[R, E, A]): ZIO[R, E, A]
-
def
withPermitManaged[R, E]: ZManaged[R, E, Unit]
-
def
withPermits[R, E, A](n: Long)(task: ZIO[R, E, A]): ZIO[R, E, A]
-
def
withPermitsManaged[R, E](n: Long): ZManaged[R, E, Unit]
An asynchronous semaphore, which is a generalization of a mutex. Semaphores have a certain number of permits, which can be held and released concurrently by different parties. Attempts to acquire more permits than available result in the acquiring fiber being suspended until the specified number of permits become available.