<@U658T9GQ1> There are two choices you have: You c...
# coroutines
e
@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
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
Cancel yes. You have a kill switch on a rocket you've fired :) But there is no provision to get any result back.