Skip to content
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

Impossible to attach coroutine context to CompletableJob #3428

Open
dovchinnikov opened this issue Aug 25, 2022 · 3 comments
Open

Impossible to attach coroutine context to CompletableJob #3428

dovchinnikov opened this issue Aug 25, 2022 · 3 comments
Assignees

Comments

@dovchinnikov
Copy link
Contributor

I've managed to dump the full parent-child tree via internal APIs (#3427), and I've discovered, that the coroutine name is not attached to the Job created by CoroutineScope. The name is only copied to child coroutines as is.

val cs = CoroutineScope(CoroutineName("MyComponent"))

Another title of this issue: "CoroutineScope is not a coroutine like launch/async".

@dovchinnikov
Copy link
Contributor Author

dovchinnikov commented Jan 20, 2023

@mvicsokolova mvicsokolova self-assigned this Jan 23, 2023
@DQSecret
Copy link

Currently, we have to use the following approach:

https://github.com/JetBrains/intellij-community/blob/8bce81b67d20a1fc0f538cc0d3c1c04b15b61790/platform/util/src/com/intellij/util/coroutineScope.kt#L25

Excuse me, how to achieve it?
My code is as follows:
image

But the result is not satisfactory。
PS: Run in Android Studio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants