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 larger Do
.
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 larger Do
.
monadicCloseable for creating a Do
whose release operation is asynchronous.
delay for non-strict garbage collected Do
now for strict garbage collected Do
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 larger Do
.
monadicCloseable for creating a Do
whose release operation is asynchronous.
delay for non-strict garbage collected 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,
A
will be recreated each time it is sequenced into a larger Do
.
A
must be a garbage-collected type that does not hold native resource.
autoCloseable for auto-closeable Do
now for strict garbage collected Do
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,
A
will be recreated each time it is sequenced into a larger Do
.
autoCloseable 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,
A
will be recreated each time it is sequenced into a larger Do
.
A
must be a garbage-collected type that does not hold native resource.
delay for non-strict garbage collected Do
autoCloseable 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,
A
will be recreated each time it is sequenced into a larger Do
.
A
must be a garbage-collected type that does not hold native resource.
delay for non-strict garbage collected Do
autoCloseable 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,
A
will be recreated each time it is sequenced into a larger Do
.
A
must be a garbage-collected type that does not hold native resource.
delay for non-strict garbage collected Do
autoCloseable for auto-closeable Do
now for strict garbage collected Do
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 larger Do
.
autoCloseable for auto-closeable Do
delay for non-strict garbage collected Do
now for strict garbage collected Do
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 larger Do
.
autoCloseable for auto-closeable Do
delay for non-strict garbage collected Do
now for strict garbage collected Do
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 larger Do
.
autoCloseable for auto-closeable Do
delay for non-strict garbage collected Do
now for strict garbage collected Do
Returns a nested scope of doA
.
Returns a nested scope of doA
.
All resources created during building A
will be released after A
is built.
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
AsynchronousDoOps.run for running a Do
as a ThoughtWorks Future.
garbageCollected for creating a garbage collected Do
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.
autoCloseable for auto-closeable Do
delay for non-strict garbage collected Do
(Since version 3.0.0) Use autoCloseable instead.
(Since version 3.0.0) Use autoCloseable instead.
(Since version 3.0.0) Use autoCloseable instead.
(Since version 3.0.0) Use autoCloseable instead.
The companion object of Do