How to Run a ZIO ActorSystem? #385
Unanswered
christophknabe
asked this question in
Q&A
Replies: 1 comment
-
In the meantime I found the reason for not ping-ponging. The def main(args: Array[String]): Unit = {
val minSeconds = 2
import zio.duration._
val delayed = UIO.unit.delay(minSeconds.seconds).map(_ => s"$minSeconds seconds passed")
val exitCode = Runtime.default.unsafeRunSync(program.zipPar(delayed))
.fold(_ => failure, result => { println(s"ZIO App completed successfully with result $result"); success })
System.exit(exitCode.code)
} The output now texts:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In https://github.com/zio/zio-actors/blob/master/docs/usecases/pingpong.md is a Ping Pong example with ZIO Actors. However when I am trying to run it using
"dev.zio" %% "zio-actors" % "0.0.9"
I do not see anyPing!
orPong!
.I suppose it is something basic. Would be nice if you could give me a hint or complete your Ping Pong example. My code trying to run it (simplified by removing the remote parts) is shown here. The output is only
ZIO App completed successfully with result ()
.Beta Was this translation helpful? Give feedback.
All reactions