https://kotlinlang.org logo
#coroutines
Title
# coroutines
r

Rechee Jozil

10/19/2020, 9:52 PM
Unique CoroutineName per child coroutine Right now if you pass a CoroutineName in a context, that name is propagated down to children Coroutines. I guess this makes sense. That's behavior for any context element except for Job. I think it would be nice to give children Coroutines unique names based off their parents CoroutineName. Does that make sense? In the end... I would like a way to identify children Coroutines vs top level Coroutines. Is there a way to do this?
m

Marc Knaup

10/19/2020, 9:57 PM
Isn’t that already the case? When I debug child coroutines they usually have the name of the parent plus a number at the end.
r

Rechee Jozil

10/19/2020, 9:58 PM
@Marc Knaup is that the case when you pass in the name explicitly?
(I'm on Android studio btw)
m

Marc Knaup

10/19/2020, 10:06 PM
Yeah, I remember when I was debugging a few days ago I had mu
CoroutineContext
with name
XYZ
and the coroutines inside where named
XZY@number
or something like that
r

Rechee Jozil

10/19/2020, 10:07 PM
Oh interesting. Maybe that's because of debug mode? I don't know how to enable that for android studio. Also I'd want it outside debug mode
4 Views