Semaphore

object Semaphore
Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[F[_]](n: Long)(F: Concurrent[F]): F[Semaphore[F]]

Creates a new Semaphore, initialized with n available permits.

Creates a new Semaphore, initialized with n available permits.

def in[F[_], G[_]](n: Long)(F: Sync[F], G: Concurrent[G]): F[Semaphore[G]]

Creates a new Semaphore, initialized with n available permits. like apply but initializes state using another effect constructor

Creates a new Semaphore, initialized with n available permits. like apply but initializes state using another effect constructor

def uncancelable[F[_]](n: Long)(F: Async[F]): F[Semaphore[F]]

Like apply but only requires an Async constraint in exchange for the various acquire effects being uncancelable.

Like apply but only requires an Async constraint in exchange for the various acquire effects being uncancelable.

WARN: some Async data types, like IO, can be cancelable, making uncancelable values unsafe. Such values are only useful for optimization purposes, in cases where the use case does not require cancellation or in cases in which an F[_] data type that does not support cancellation is used.

def uncancelableIn[F[_], G[_]](n: Long)(F: Sync[F], G: Async[G]): F[Semaphore[G]]

Creates a new Semaphore, initialized with n available permits. Like apply but only requires an Async constraint in exchange for the various acquire effects being uncancelable and initializes state using another effect constructor

Creates a new Semaphore, initialized with n available permits. Like apply but only requires an Async constraint in exchange for the various acquire effects being uncancelable and initializes state using another effect constructor