Returns a non-strict Do
whose release operation is no-op.
Returns a Do
that runs in executorContext
.
Returns a Do
that runs in executorContext
.
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 the Do
is non-strict,
Value
will be recreated each time it is sequenced into a larger Do
.
scoped for auto-closeable Do
now for strict garbage collected Do
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,
Value
will be recreated each time it is sequenced into a larger Do
.
Value
must be a garbage-collected type that does not hold native resource.
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,
Value
will be recreated each time it is sequenced into a larger Do
.
Value
must be a garbage-collected type that does not hold native resource.
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,
Value
will be recreated each time it is sequenced into a larger Do
.
Value
must be a garbage-collected type that does not hold native resource.
Converts a strict value to a Do
whose release operation is no-op.
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.
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.
The companion object of Do