Object

monifu.concurrent

Implicits

Related Doc: package concurrent

Permalink

object Implicits

Defines implicit values that can be used by importing in the current context.

Example:

import monifu.concurrent.Implicits.globalScheduler
Source
Implicits.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Implicits
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. implicit lazy val globalScheduler: Scheduler

    Permalink

    A global Scheduler instance, provided for convenience, piggy-backing on top of Scala's own concurrent.ExecutionContext.global, which is a ForkJoinPool.

    A global Scheduler instance, provided for convenience, piggy-backing on top of Scala's own concurrent.ExecutionContext.global, which is a ForkJoinPool.

    It can be tuned by setting the following JVM system properties:

    - "scala.concurrent.context.minThreads" an integer specifying the minimum number of active threads in the pool

    - "scala.concurrent.context.maxThreads" an integer specifying the maximum number of active threads in the pool

    - "scala.concurrent.context.numThreads" can be either an integer, specifying the parallelism directly or a string with the format "xNUM" (e.g. "x1.5") specifying the multiplication factor of the number of available processors (taken with Runtime.availableProcessors)

    The formula for calculating the parallelism in our pool is min(maxThreads, max(minThreads, numThreads)).

    To set a system property from the command line, a JVM parameter must be given to the java command as -Dname=value. So as an example, to customize this global scheduler, we could start our process like this:

      java -Dscala.concurrent.context.minThreads=2 \
           -Dscala.concurrent.context.maxThreads=30 \
           -Dscala.concurrent.context.numThreads=x1.5 \
           ...
    

    As a note, this being backed by Scala's own global execution context, it is cooperating with Scala's BlockContext, so when operations marked with scala.concurrent.blocking are encountered, the thread-pool may decide to add extra threads in the pool. However this is not a thread-pool that is optimal for doing blocking operations, so for example if you want to do a lot of blocking I/O, then use a Scheduler backed by a thread-pool that is more optimal for blocking. See for example Scheduler.io.

  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  17. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped