Acquire a Permit, asynchronously.
Acquire a Permit, asynchronously. Be sure to permit.release() in a 'finally' block of your onSuccess() callback.
Interrupting this future is only advisory, and will not release the permit if the future has already been satisfied.
a Future[Permit] when the Future is satisfied, computation can proceed, or a Future.Exception[RejectedExecutionException] if the configured maximum number of waitq would be exceeded.
Execute the function asynchronously when a permit becomes available.
Execute the function asynchronously when a permit becomes available.
If the function throws a non-fatal exception, the exception is returned as part of the Future. For all exceptions, the permit would be released before returning.
a Future[T] equivalent to the return value of the input function. If the configured maximum value of waitq is reached, Future.Exception[RejectedExecutionException] is returned.
Execute the function when a permit becomes available.
Execute the function when a permit becomes available.
If the function throws an exception, the exception is returned as part of the Future. For all exceptions, the permit would be released before returning.
a Future[T] equivalent to the return value of the input function. If the configured maximum value of waitq is reached, Future.Exception[RejectedExecutionException] is returned.