ConcurrencyLimiter

scalus.cardano.node.ConcurrencyLimiter
class ConcurrencyLimiter(maxConcurrent: Int)(using ec: ExecutionContext)

Limits the number of concurrent futures that can be executing. Cross-platform (JVM/JS) and non-blocking.

Value parameters

maxConcurrent

Maximum number of futures that can execute concurrently

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def apply[T](f: => Future[T]): Future[T]

Execute a future with concurrency limiting.

Execute a future with concurrency limiting.

Value parameters

f

A by-name parameter that creates the future to execute

Attributes

Returns

A future that completes when the original future completes