org.specs2.concurrent

Type members

Classlikes

case class ExecutionEnv(executorServices: ExecutorServices, timeFactor: Int)
Companion
object
object ExecutionEnv
Companion
class
case class ExecutorServices(executorServiceEval: () => ExecutorService, executionContextEval: () => ExecutionContext, scheduledExecutorServiceEval: () => ScheduledExecutorService, schedulerEval: () => Scheduler, shutdown: () => Unit)
Companion
object
Companion
class

implicit methods to await a future values with a given timeout and number of retries

implicit methods to await a future values with a given timeout and number of retries

Companion
object
object FutureAwait extends FutureAwait
Companion
class

add implicit conversions between the execution environment and execution context / executor service

add implicit conversions between the execution environment and execution context / executor service

deactivate the conversion between an implicit execution environment to an executor service

deactivate the conversion between an implicit execution environment to an executor service

trait Scheduler

The design of the Scheduler is taken from: https://github.com/functional-streams-for-scala/fs2/blob/series/1.0/core/jvm/src/main/scala/fs2/Scheduler.scala

object Schedulers
case class TimeoutFailure(appliedTimeout: FiniteDuration, totalDuration: FiniteDuration, timeFactor: Int)

Value members

Concrete methods

def awaitAction[A](runNow: ExecutionEnv => Future[A], timeout: Option[FiniteDuration], finalizeWith: => Unit, ee: ExecutionEnv): Either[Throwable, A]

Run the action and return an exception if it fails Whatever happens run the finalizers

Run the action and return an exception if it fails Whatever happens run the finalizers

def runActionToFuture[A](runNow: ExecutionEnv => Future[A], timeout: Option[FiniteDuration], ee: ExecutionEnv): Future[A]

run as a Future and raise a timeout exception if necessary NOTE: this does not execute the finalizers!!!

run as a Future and raise a timeout exception if necessary NOTE: this does not execute the finalizers!!!