blob: 206155ce2ac69c511e1bc133f1954c7d77dce6ec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package scala.concurrent
/** The <code>FutureTaskRunner</code> 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
}
|