buzzer.completebut it's very very likely innocuous
implicit val system = ActorSystem("QuickStart") implicit val materializer = ActorMaterializer() implicit val executor = system.getDispatcher val ticker = Source.tick(0.second, 1.second, "H") .runWith(Sink.foreach(println))
tickerof the ticker is
fs2-reactive-streamswill get you a stream where multiple libraries form the connecting pieces of it, which might be what you want. Another alternative is to just do an
unsafeRunSyncinside of the
foreach(not my first choice but it should "work"). Personally if it were me I would defer to fs2 as much as possible as it has direct support for cats effect .
fs2-reactive-streams. If your application is already mostly Akka Streams and you just want to run some isolated pure code in there, just running the
IOis also an option (albeit a compromise)
runthe Akka stream, since
Futures start immediately. Put the
run(args: List[String]): IO[ExitCode]method.