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

com.twitter.util.FutureTask.scala Maven / Gradle / Ivy

package com.twitter.util

object FutureTask {
  def apply[A](fn: => A): FutureTask[A] = new FutureTask[A](fn)
}

class FutureTask[A](fn: => A) extends Promise[A] with Runnable {
  def run(): Unit = {
    update(Try(fn))
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy