com.thoughtworks.raii.asynchronous
A Do tagged as Parallel.
ParallelDo and Do can be converted to each other via scalaz.Tags.Parallel. Given a Do,
ParallelDo
import com.thoughtworks.raii.asynchronous.{Do, ParallelDo} import java.net._ import java.io._ val originalDoInput: Do[InputStream] = Do.scoped(new URL("http://thoughtworks.com/").openStream())
when converting it to ParallelDo and converting it back,
import scalaz.Tags.Parallel val parallelDoInput: ParallelDo[InputStream] = Parallel(originalDoInput) val Parallel(doInput) = parallelDoInput
then the Do should be still the original instance.
doInput should be(originalDoInput)
ParallelDo.doParallelApplicative for the Applicative type class for parallel computing.
A Do tagged as Parallel.
ParallelDo
and Do can be converted to each other via scalaz.Tags.Parallel. Given a Do,when converting it to
ParallelDo
and converting it back,then the Do should be still the original instance.
ParallelDo.doParallelApplicative for the Applicative type class for parallel computing.