Package

scalax

concurrent

Permalink

package concurrent

Visibility
  1. Public
  2. All

Type Members

  1. trait Cancelable extends AnyRef

    Permalink

    Represents an asynchronous computation whose execution can be canceled.

    Represents an asynchronous computation whose execution can be canceled.

    It is equivalent to java.io.Closeable, but without the I/O focus, or to IDisposable in Microsoft .NET, or to akka.actor.Cancellable.

    See also

    scalax.concurrent.cancelables

Value Members

  1. object Cancelable

    Permalink
  2. package cancelables

    Permalink

    Cancelables represent asynchronous units of work or other things scheduled for execution and whose execution can be canceled.

    Cancelables represent asynchronous units of work or other things scheduled for execution and whose execution can be canceled.

    One use-case is the scheduling done by scalax.concurrent.Scheduler, in which the scheduling methods return a Cancelable, allowing the canceling of the scheduling.

    Example:

    val s = ConcurrentScheduler()
    val task = s.scheduleRepeated(10.seconds, 50.seconds, {
      println("Hello")
    })
    
    // later, cancels the scheduling ...
    task.cancel()

Ungrouped