alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (FutureTaskRunner.scala)

This example Scala source code file (FutureTaskRunner.scala) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Scala tags/keywords

future, future, futuretaskrunner, futuretaskrunner, managedblocker, s, task, taskrunner, taskrunner, unit, unit

The Scala FutureTaskRunner.scala source code

package scala.concurrent

/** The <code>FutureTaskRunner trait is a base trait of task runners
 *  that provide some sort of future abstraction.
 * 
 *  @author Philipp Haller
 */
trait FutureTaskRunner extends TaskRunner {

  /** The type of the futures that the underlying task runner supports.
   */
  type Future[T]

  /** An implicit conversion from futures to zero-parameter functions.
   */
  implicit def futureAsFunction[S](x: Future[S]): () => S

  /** Submits a task to run which returns its result in a future.
   */
  def submit[S](task: Task[S]): Future[S]

   /* Possibly blocks the current thread, for example, waiting for
    * a lock or condition.
    */
  def managedBlock(blocker: ManagedBlocker): Unit

}

Other Scala examples (source code examples)

Here is a short list of links related to this Scala FutureTaskRunner.scala source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.