https://kotlinlang.org logo
#coroutines
Title
# coroutines
e

elizarov

07/18/2017, 8:25 PM
@ait There are two choices you have: You can either
launch
(fire and forget a new coroutine) or do
runBlocking
(to blocking invoking thread while the coroutine is running)
g

groostav

07/19/2017, 6:33 PM
You've used the phrase "fire and forget" to describe
launch
a couple times but I feel like that sells it a little short,
launch
returns a
Job
, and that's one of the base management interfaces you wrote kotlin has for the cancellation implementation, and is pretty important. In other words, launch can be fire and forget, but it also allows users to cancel it if they see fit.
e

elizarov

07/19/2017, 7:24 PM
Cancel yes. You have a kill switch on a rocket you've fired :) But there is no provision to get any result back.
3 Views