-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,14 @@ public object NonCancellable : AbstractCoroutineContextElement(Job), Job { | |
|
||
private const val message = "NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited" | ||
|
||
/** | ||
* 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 commentThe reason will be displayed to describe this comment to others. Learn more. Does it make sense to add There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 :) |
||
override val parent: Job? | ||
get() = null | ||
|
||
/** | ||
* Always returns `true`. | ||
* @suppress **This an internal API and should not be used from general code.** | ||
|
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.
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.