-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Introduce Job.parent API #3384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Job.parent API #3384
Conversation
* The API is crucial for debugger extension and deadlock detection * It enables allows more fluent coroutines hierarchy inspection, e.g. capability to build a list of roots and procrss them top-bottom separately Fixes #3201
* Always returns `null`. | ||
* @suppress **This an internal API and should not be used from general code.** | ||
*/ | ||
@Deprecated(level = DeprecationLevel.WARNING, message = message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to add ReplaceWith(null)
to allow for automatic replacements in bulk? I don't see the downsides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, it rather means that the whole usage of this API is incorrect and it's time to rethink what is written :)
* Accesses to this property are not idempotent, the property becomes `null` as soon | ||
* as the job is transitioned to its final state, whether it is cancelled or completed, | ||
* and all job children are completed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Accesses to this property are not idempotent, the property becomes `null` as soon | |
* as the job is transitioned to its final state, whether it is cancelled or completed, | |
* and all job children are completed. | |
* Accesses to this property are not idempotent: the property becomes `null` as soon | |
* as the job is transitioned to its final state—whether it is cancelled or completed— | |
* and all job children are completed. |
Do we allow Unicode in comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to avoid it, we never know whether Dokka and kotlinlang support it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This argument cuts both ways: we may treat this as a good chance to find out. I don't care that much though.
Co-authored-by: dkhalanskyjb <[email protected]>
Co-authored-by: dkhalanskyjb <[email protected]>
Fixes #3201