All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bisabelle_2.11.0.3.4.source-code.CancellableFuture.scala Maven / Gradle / Ivy

There is a newer version: 1.1.0-RC3
Show newest version
package edu.tum.cs.isabelle

import scala.concurrent._

import acyclic.file

class CancellableFuture[T](private[isabelle] val promise: Promise[T], private[isabelle] val doCancel: () => Unit) {
  val future: Future[T] = promise.future

  def cancel(): Unit = {
    doCancel()
    promise.tryFailure(new CancellationException())
    ()
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy