Task
com.thoughtworks.dsl.domains.Task$package$.Task$
object Task
Attributes
- Authors:
杨博 (Yang Bo)
- Source:
- Task.scala
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- Task.type
Members list
Concise view
Type members
Types
Attributes
- Source:
- Task.scala
Value members
Concrete methods
Attributes
- Source:
- Task.scala
Attributes
- Source:
- Task.scala
Attributes
- Source:
- Task.scala
Attributes
- Source:
- Task.scala
Returns a task that does nothing but let the succeeding tasks run on
executionContext
Returns a task that does nothing but let the succeeding tasks run on
executionContext
Attributes
- Example:
All the code after a
!switchExecutionContext
should be executed onexecutionContext
import com.thoughtworks.dsl.macros.Reset.Default.* import com.thoughtworks.dsl.domains.Task import org.scalatest.Assertion import scala.concurrent.ExecutionContext import com.thoughtworks.dsl.keywords.Shift def myTask: Task[Assertion] = Task { val originalThread = Thread.currentThread !Shift(Task.switchExecutionContext(ExecutionContext.global)) Thread.currentThread should not be originalThread } Task.toFuture(myTask)
- Source:
- Task.scala
Converts a Task to a scala.concurrent.Future.
Converts a Task to a scala.concurrent.Future.
Attributes
- See also:
keywords.Await for converting a scala.concurrent.Future to a Task.
- Source:
- Task.scala