Created
May 17, 2019 13:06
-
-
Save adamw/d88840817d236971874ca7b23f8bb9e6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import monix.eval.Task | |
import monix.execution.Scheduler.Implicits.global | |
object Hello extends App { | |
val task = Task( | |
println(s"Hello, world from thread: ${Thread.currentThread().getName}!") | |
) | |
(for { | |
fiber1 <- task.start | |
_ <- task | |
_ <- fiber1.join | |
} yield ()).runSyncUnsafe() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment