Are there any valid use cases for passing your own...
# coroutines
l
Are there any valid use cases for passing your own
Job()
object to
launch
or
async
? For most use cases, its better to launch them in another scope or use
superVisorScope{}
if you want to use
SupervisorJob
, right?
g
there are some use cases, after all this what all standard coroutine builders with scope are doing But for most of code it’s not needed
z
Note that even if you pass an explicit job to the builder, the job inside the builder will be a different job that is a child of the one you pass in. And if you're manually creating a Job, don't forget to pass the current scope's job in as the parent.
l
@Zach Klippenstein (he/him) [MOD] Oh, thanks for the hint 🙂