- Companion
- class
Type members
Classlikes
Value members
Concrete methods
Builds a Semaphore instance.
Builds a Semaphore instance.
- Value Params
- F
is the type class instance required to make
Semaphore
work, can be eitherConcurrent
orAsync
for extra flexibility- cs
is a
ContextShift
instance required in order to introduce async boundaries after successfulacquire
operations, for safety- provisioned
is the number of permits initially available
- ps
is an optional padding strategy for avoiding the "false sharing problem", a common JVM effect when multiple threads read and write in shared variables
Builds a Semaphore instance.
Builds a Semaphore instance.
'''Unsafe warning:''' this violates referential transparency. Use with care, prefer the pure Semaphore.apply.
- Value Params
- F
is the type class instance required to make
Semaphore
work, can be eitherConcurrent
orAsync
for extra flexibility- cs
is a
ContextShift
instance required in order to introduce async boundaries after successfulacquire
operations, for safety- provisioned
is the number of permits initially available
- ps
is an optional padding strategy for avoiding the "false sharing problem", a common JVM effect when multiple threads read and write in shared variables