zio.temporal.workflow.ZAsync
See theZAsync companion object
Contains result of an asynchronous computation. Similar to zio.IO with the following differences:
- Can be used only inside a Temporal workflow code. Use zio.ZIO and its derivatives to implement activities and workflow starting and querying code.
runmethod doesn't throw InterruptedException. The only way to unblockrunis to complete the ZAsync - ZAsync doesn't directly supports cancellation. Use io.temporal.workflow.CancellationScope to cancel and handle cancellations. The pattern is that a canceled operation completes its ZAsync with io.temporal.failure.CanceledFailure when canceled.
- Unlike zio.IO (that is '''lazy'''), ZAsync is '''strict'''. Whenever a ZAsync is created, The thunk is immediately started
Attributes
Members list
In this article