Hi! I can not figure out how to implement method o...
# coroutines
a
Hi! I can not figure out how to implement method of 3rd party interface as suspendable when I know that I will call it in suspendable context. What I need is some way to access CoroutineScope of running coroutine (I have some useful data in there) Any hints? I imagine something like ThreadLocal but did not find anything in API.
f
I guess you'll have to write your own CoroutineDispatcher, from the dispatch method you have access to both the CoroutineContext and the Runnable block to execute, so I guess you could set your ThreadLocal from there