object Task
- Source
- task.scala
- Alphabetic
- By Inheritance
- Task
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[A](a: ⇒ A): com.thoughtworks.dsl.domains.task.Task[A] @com.thoughtworks.dsl.Dsl.reset
- Annotations
- @inline()
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def blockingAwait[A](task: Task[A], timeout: Duration = ...): A
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
delay[A](f: () ⇒ A): Task[A]
- Annotations
- @inline()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def join[Element, That](element: Element)(implicit factory: Factory[Element, That]): com.thoughtworks.dsl.domains.task.Task[That] @com.thoughtworks.dsl.Dsl.reset
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
now[A](a: A): Task[A]
- Annotations
- @inline()
- def onComplete[A](task: Task[A])(continue: (Try[A]) ⇒ Unit): Unit
-
def
switchExecutionContext(executionContext: ExecutionContext): Task[Unit]
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
- Annotations
- @inline()
All the code after a
!switchExecutionContext
should be executed onexecutionContext
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)
Example: -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toFuture[A](task: Task[A]): Future[A]
Converts a Task to a scala.concurrent.Future.
Converts a Task to a scala.concurrent.Future.
- See also
keywords.Await for converting a scala.concurrent.Future to a Task.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()