object Do
- Alphabetic
- By Inheritance
- Do
- 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](tryT: TryT[[+β$1$]ResourceT[[+A]Continuation[Unit, A], β$1$], A]): Do[A]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def async[A](start: ((Resource[UnitContinuation, Try[A]]) ⇒ Unit) ⇒ Unit): Do[A]
-
def
autoCloseable[A <: AutoCloseable](value: ⇒ A): Do[A]
Returns a non-strict
Do
whose release operation is java.lang.AutoCloseable.close.Returns a non-strict
Do
whose release operation is java.lang.AutoCloseable.close.Since the
Do
is non-strict,A
will be recreated each time it is sequenced into a largerDo
. -
def
autoCloseable[A <: AutoCloseable](continuation: UnitContinuation[A], dummyImplicit: DummyImplicit = DummyImplicit.dummyImplicit): Do[A]
Returns a non-strict
Do
whose release operation is java.lang.AutoCloseable.close.Returns a non-strict
Do
whose release operation is java.lang.AutoCloseable.close.Since the
Do
is non-strict,A
will be recreated each time it is sequenced into a largerDo
.- See also
monadicCloseable for creating a
Do
whose release operation is asynchronous.delay for non-strict garbage collected
Do
now for strict garbage collected
Do
-
def
autoCloseable[A <: AutoCloseable](future: Future[A]): Do[A]
Returns a non-strict
Do
whose release operation is java.lang.AutoCloseable.close.Returns a non-strict
Do
whose release operation is java.lang.AutoCloseable.close.Since the
Do
is non-strict,A
will be recreated each time it is sequenced into a largerDo
.- See also
monadicCloseable for creating a
Do
whose release operation is asynchronous.delay for non-strict garbage collected
Do
now for strict garbage collected
Do
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
delay[A](value: ⇒ A): Do[A]
Returns a non-strict
Do
whose release operation is no-op.Returns a non-strict
Do
whose release operation is no-op.Since the
Do
is non-strict,A
will be recreated each time it is sequenced into a largerDo
.A
must be a garbage-collected type that does not hold native resource.- See also
autoCloseable for auto-closeable
Do
now for strict garbage collected
Do
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
execute[A](value: ⇒ A)(implicit executorContext: ExecutionContext): Do[A]
Returns a
Do
that runs inexecutorContext
.Returns a
Do
that runs inexecutorContext
.- Note
This method is usually been used for changing the current thread.
import java.util.concurrent._ import scala.concurrent._ import scalaz.syntax.all._ import com.thoughtworks.raii.asynchronous._ implicit def executorContext = ExecutionContext.fromExecutor(Executors.newSingleThreadExecutor()) val mainThread = Thread.currentThread val doAssertion = for { _ <- Do.delay(()) threadBeforeJump = Thread.currentThread _ = threadBeforeJump should be(mainThread) _ <- Do.execute(()) threadAfterJump = Thread.currentThread } yield { threadAfterJump shouldNot be(mainThread) } doAssertion.run
Returns a non-strict
Do
whose release operation is no-op. Since theDo
is non-strict,A
will be recreated each time it is sequenced into a largerDo
.- See also
autoCloseable for auto-closeable
Do
now for strict garbage collected
Do
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
garbageCollected[A](contT: ContT[Trampoline, Unit, A]): Do[A]
Returns a non-strict
Do
whose release operation is no-op.Returns a non-strict
Do
whose release operation is no-op.Since the
Do
is non-strict,A
will be recreated each time it is sequenced into a largerDo
.A
must be a garbage-collected type that does not hold native resource.- See also
delay for non-strict garbage collected
Do
autoCloseable for auto-closeable
Do
now for strict garbage collected
Do
-
def
garbageCollected[A](continuation: UnitContinuation[A], dummyImplicit: DummyImplicit = DummyImplicit.dummyImplicit): Do[A]
Returns a non-strict
Do
whose release operation is no-op.Returns a non-strict
Do
whose release operation is no-op.Since the
Do
is non-strict,A
will be recreated each time it is sequenced into a largerDo
.A
must be a garbage-collected type that does not hold native resource.- See also
delay for non-strict garbage collected
Do
autoCloseable for auto-closeable
Do
now for strict garbage collected
Do
-
def
garbageCollected[A](future: Future[A]): Do[A]
Returns a non-strict
Do
whose release operation is no-op.Returns a non-strict
Do
whose release operation is no-op.Since the
Do
is non-strict,A
will be recreated each time it is sequenced into a largerDo
.A
must be a garbage-collected type that does not hold native resource.- See also
delay for non-strict garbage collected
Do
autoCloseable for auto-closeable
Do
now for strict garbage collected
Do
-
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
monadicCloseable[A <: MonadicCloseable[UnitContinuation]](value: ⇒ A): Do[A]
Returns a non-strict
Do
whose release operation is asynchronous.Returns a non-strict
Do
whose release operation is asynchronous.Since the
Do
is non-strict,A
will be recreated each time it is sequenced into a largerDo
.- See also
autoCloseable for auto-closeable
Do
delay for non-strict garbage collected
Do
now for strict garbage collected
Do
-
def
monadicCloseable[A <: MonadicCloseable[UnitContinuation]](future: UnitContinuation[A], dummyImplicit: DummyImplicit = DummyImplicit.dummyImplicit): Do[A]
Returns a non-strict
Do
whose release operation is asynchronous.Returns a non-strict
Do
whose release operation is asynchronous.Since the
Do
is non-strict,A
will be recreated each time it is sequenced into a largerDo
.- See also
autoCloseable for auto-closeable
Do
delay for non-strict garbage collected
Do
now for strict garbage collected
Do
-
def
monadicCloseable[A <: MonadicCloseable[UnitContinuation]](future: Future[A]): Do[A]
Returns a non-strict
Do
whose release operation is asynchronous.Returns a non-strict
Do
whose release operation is asynchronous.Since the
Do
is non-strict,A
will be recreated each time it is sequenced into a largerDo
.- See also
autoCloseable for auto-closeable
Do
delay for non-strict garbage collected
Do
now for strict garbage collected
Do
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nested[A](doA: Do[A]): Do[A]
Returns a nested scope of
doA
.Returns a nested scope of
doA
.All resources created during building
A
will be released afterA
is built.- Note
This method has the same behavior as
,Do.garbageCollected(doA.run)
.A
must be a garbage collected type, i.e. not a java.lang.AutoCloseable or a com.thoughtworks.raii.covariant.MonadicCloseable- See also
AsynchronousDoOps.run for running a
Do
as a ThoughtWorks Future.garbageCollected for creating a garbage collected
Do
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
now[A](value: A): Do[A]
Converts a strict value to a
Do
whose release operation is no-op.Converts a strict value to a
Do
whose release operation is no-op.A
must be a garbage-collected type that does not hold native resource.- See also
autoCloseable for auto-closeable
Do
delay for non-strict garbage collected
Do
- def resource[A](resource: ⇒ Resource[UnitContinuation, A]): Do[A]
- def safeAsync[A](start: ((Resource[UnitContinuation, Try[A]]) ⇒ Trampoline[Unit]) ⇒ Trampoline[Unit]): Do[A]
- def suspend[A](doValue: ⇒ Do[A]): Do[A]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def unapply[A](doValue: Do[A]): Some[TryT[[+β$2$]ResourceT[[+A]Continuation[Unit, A], β$2$], A]]
-
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
- @native() @throws( ... )
Deprecated Value Members
-
def
scoped[A <: AutoCloseable](value: ⇒ A): Do[A]
- Annotations
- @deprecated
- Deprecated
(Since version 3.0.0) Use autoCloseable instead.
-
def
scoped[A <: AutoCloseable](contT: ContT[Trampoline, Unit, A]): Do[A]
- Annotations
- @deprecated
- Deprecated
(Since version 3.0.0) Use autoCloseable instead.
-
def
scoped[A <: AutoCloseable](future: UnitContinuation[A], dummyImplicit: DummyImplicit = DummyImplicit.dummyImplicit): Do[A]
- Annotations
- @deprecated
- Deprecated
(Since version 3.0.0) Use autoCloseable instead.
-
def
scoped[A <: AutoCloseable](future: Future[A]): Do[A]
- Annotations
- @deprecated
- Deprecated
(Since version 3.0.0) Use autoCloseable instead.