There is no overlap between a Scope and Job. Scope is simply a reference to a context in which to launch a new coroutine. Nothing more to it. It is the Job’s responsibility to control the whole lifecycle. Since there is more to coroutine than lifecycle (there is also a dispatcher, plus other optional context elements), then we need a context = Job + everything else. Frankly, I don’t see an alternative design that is as minimal and has the same features.

Written by

Project Lead for the Kotlin Programming Language @JetBrains

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store