Open
Description
What do we have now?
It's possible to pass Job
as part of context to the mentioned functions:
withContext(Job()) {
...
}
cs.launch(Job()) {
...
}
cs.async(Job()) {
...
}
What should be instead?
Error should be logged when a Job
is detected in the added context.
Why?
All above cases "replace" the context Job
and attach the scope Job
to the passed Job()
as a child.
This might be unexpected at best, and plain dangerous because it breaks parent-child relation.