Task

gears.async.Task
class Task[+T](val body: (Async, AsyncOperations) ?=> T)

A task is a template that can be turned into a runnable future Composing tasks can be referentially transparent. Tasks can be also ran on a specified schedule.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def run()(using Async, AsyncOperations): T

Run the current task and returns the result.

Run the current task and returns the result.

Attributes

def schedule(s: TaskSchedule): Task[T]
def start()(using async: Async, spawn: Spawn & async.type, asyncOps: AsyncOperations): Future[T]

Start a future computed from the body of this task

Start a future computed from the body of this task

Attributes

Concrete fields

val body: (Async, AsyncOperations) ?=> T