s_mach

concurrent

package concurrent

s_mach.concurrent is an open-source Scala library that provides asynchronous serial and parallel execution flow control primitives for working with asynchronous tasks. An asynchronous task consists of two or more calls to function(s) that return a future result A ⇒ Future[B] instead of the result A ⇒ B.

-

Adds concurrent flow control primitives async and async.par for performing fixed size heterogeneous (tuple) and variable size homogeneous (collection) asynchronous tasks. These primitives:

-

Allow enabling optional progress reporting, failure retry and/or throttle control for asynchronous tasks

-

Ensure proper sequencing of returned futures, e.g. given f: Int ⇒ Future[String]:

-

List(1,2,3).async.map(f) returns Future[List[String]]

-

async.par.run(f(1),f(2),f(3)) returns Future[(String,String,String)]

-

Ensure fail-immediate sequencing of future results (see the Under the hood: Merge section for details)

-

Ensure all exceptions generated during asynchronous task processing can be retrieved (Future.sequence returns only the first)

-

collection.async and collection.async.par support collection operations such as map, flatMap and foreach on asynchronous functions, i.e. A ⇒ Future[B]

-

async.par.run(future1, future2, …) supports running fixed size heterogeneous asynchronous task (of up to 22 futures) in parallel

-

Adds ScheduledExecutionContext, a Scala interface wrapper for java.util.concurrent.ScheduledExecutorService that provides for scheduling delayed and periodic tasks

-

Adds non-blocking concurrent control primitives such as Barrier, Latch, Lock and Semaphore

-

Provides convenience methods for writing more readable, concise and DRY concurrent code such as Future.get, Future.toTry and Future.fold

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. concurrent
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait AsyncParThrowable extends Throwable

    A trait for capturing all failures thrown during an asynchronous parallel task.

    A trait for capturing all failures thrown during an asynchronous parallel task. The first failure is immediately available and all others can be retrieved by waiting on a future.

  2. trait DeferredFuture[A] extends Future[A]

    A trait for a future whose execution does not begin until some condition occurs.

    A trait for a future whose execution does not begin until some condition occurs. DeferredFuture completes once the start condition occurs and the deferred future completes.

  3. trait DelayedFuture[A] extends DeferredFuture[A]

    A trait for a future that will be started after a delay

  4. trait PeriodicTask extends AnyRef

    A trait for a task that after the initial delay expires, is repeatedly started with a specified period in the background.

    A trait for a task that after the initial delay expires, is repeatedly started with a specified period in the background. This will continue until the task is cancelled or a failure occurs.

  5. implicit final class SMach_Concurrent_PimpEverything[A] extends AnyVal

  6. implicit final class SMach_Concurrent_PimpMyAsyncConfigBuilder extends AnyVal with SMach_Concurrent_AbstractPimpMyAsyncConfig

  7. implicit final class SMach_Concurrent_PimpMyFuture[A] extends AnyVal

  8. implicit final class SMach_Concurrent_PimpMyFutureFuture[A] extends AnyVal

  9. implicit final class SMach_Concurrent_PimpMyFutureType extends AnyVal

  10. implicit final class SMach_Concurrent_PimpMyTraversableFuture[A, M[+AA] <: Traversable[AA]] extends AnyVal

  11. implicit final class SMach_Concurrent_PimpMyTraversableFutureTraversable[A, M[+AA] <: Traversable[AA], N[+AA] <: TraversableOnce[AA]] extends AnyVal

  12. implicit final class SMach_Concurrent_PimpMyTraversableOnce[A, M[+AA] <: TraversableOnce[AA]] extends AnyVal

  13. implicit final class SMach_Concurrent_PimpMyTraversableOnceFuture[A, M[AA] <: TraversableOnce[AA]] extends AnyVal

  14. trait ScheduledExecutionContext extends AnyRef

    A trait for scheduling delayed or periodic tasks

Value Members

  1. object AsyncParThrowable extends Serializable

  2. object DeferredFuture

  3. object ScheduledExecutionContext

  4. val async: AsyncConfigBuilder

    The global base asynchronous config builder configured with one worker (serial) operation with all options disabled by default

  5. package config

  6. package impl

  7. package util

Inherited from AnyRef

Inherited from Any

Ungrouped