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[Value](tryT: TryT[[+β$1$]ResourceT[[+A]Continuation[Unit, A], β$1$], Value]): Do[Value]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
delay[Value](value: ⇒ Value): Do[Value]
Returns a non-strict
Dowhose release operation is no-op. -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
execute[Value](value: ⇒ Value)(implicit executorContext: ExecutionContext): Do[Value]
Returns a
Dothat runs inexecutorContext.Returns a
Dothat 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
Dowhose release operation is no-op. Since theDois non-strict,Valuewill be recreated each time it is sequenced into a largerDo.- See also
scoped for auto-closeable
Donow for strict garbage collected
Do
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
garbageCollected[Value](contT: ContT[Trampoline, Unit, Value]): Do[Value]
Returns a non-strict
Dowhose release operation is no-op.Returns a non-strict
Dowhose release operation is no-op.Since the
Dois non-strict,Valuewill be recreated each time it is sequenced into a largerDo.Valuemust be a garbage-collected type that does not hold native resource. -
def
garbageCollected[Value](continuation: UnitContinuation[Value], dummyImplicit: DummyImplicit = DummyImplicit.dummyImplicit): Do[Value]
Returns a non-strict
Dowhose release operation is no-op.Returns a non-strict
Dowhose release operation is no-op.Since the
Dois non-strict,Valuewill be recreated each time it is sequenced into a largerDo.Valuemust be a garbage-collected type that does not hold native resource. -
def
garbageCollected[Value](future: Future[Value]): Do[Value]
Returns a non-strict
Dowhose release operation is no-op.Returns a non-strict
Dowhose release operation is no-op.Since the
Dois non-strict,Valuewill be recreated each time it is sequenced into a largerDo.Valuemust be a garbage-collected type that does not hold native resource. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
now[Value](value: Value): Do[Value]
Converts a strict value to a
Dowhose release operation is no-op. -
def
scoped[Value <: AutoCloseable](value: ⇒ Value): Do[Value]
Returns a non-strict
Dowhose release operation is java.lang.AutoCloseable.close. -
def
scoped[Value <: AutoCloseable](continuation: ContT[Trampoline, Unit, Value]): Do[Value]
Returns a non-strict
Dowhose release operation is java.lang.AutoCloseable.close. -
def
scoped[Value <: AutoCloseable](future: UnitContinuation[Value], dummyImplicit: DummyImplicit = DummyImplicit.dummyImplicit): Do[Value]
Returns a non-strict
Dowhose release operation is java.lang.AutoCloseable.close. -
def
scoped[Value <: AutoCloseable](future: Future[Value]): Do[Value]
Returns a non-strict
Dowhose release operation is java.lang.AutoCloseable.close. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def unapply[Value](doValue: Do[Value]): Some[TryT[[+β$2$]ResourceT[[+A]Continuation[Unit, A], β$2$], Value]]
-
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( ... )