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
All the code after a !switchExecutionContext
should be executed on executionContext
import com.thoughtworks.dsl.domains.task.Task import org.scalatest.Assertion import scala.concurrent.ExecutionContext import com.thoughtworks.dsl.keywords.Shift.implicitShift def myTask: Task[Assertion] = _ { val originalThread = Thread.currentThread !Task.switchExecutionContext(ExecutionContext.global) Thread.currentThread should not be originalThread } Task.toFuture(myTask)
Converts a Task to a scala.concurrent.Future.
Converts a Task to a scala.concurrent.Future.
keywords.Await for converting a scala.concurrent.Future to a Task.