Is CoroutineName not supposed to be used in userla...
# coroutines
g
Is CoroutineName not supposed to be used in userland? I’m trying to use it log that a certain Job has completed, but it’s always null even though the name was set:
z
The name isn't stored in the job, it's stored in the context (which is effectively a map that can contain both a job and a name, as well as a dispatcher, etc)
A job is a CoroutineContext, but it's a context element which means it's a context that only contains itself.
g
Oh, that makes sense. Is there a way to get the Job’s context after launching it?
l
No, the Job is just the Job. You can access the
currentCoroutineContext()
though.