Skip to content

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

Merged
merged 3 commits into from
Jul 29, 2022
Merged

Introduce Job.parent API #3384

merged 3 commits into from
Jul 29, 2022

Conversation

qwwdfsad
Copy link
Collaborator

  • 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

* 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
@qwwdfsad qwwdfsad requested a review from dkhalanskyjb July 29, 2022 15:21
* Always returns `null`.
* @suppress **This an internal API and should not be used from general code.**
*/
@Deprecated(level = DeprecationLevel.WARNING, message = message)
Copy link
Collaborator

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.

Copy link
Collaborator Author

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 :)

Comment on lines +124 to +126
* 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 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 statewhether it is cancelled or completed
* and all job children are completed.

Do we allow Unicode in comments?

Copy link
Collaborator Author

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

Copy link
Collaborator

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.

@qwwdfsad qwwdfsad merged commit 3120530 into develop Jul 29, 2022
@qwwdfsad qwwdfsad deleted the job-parent branch July 29, 2022 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants