Last active
July 22, 2019 13:27
-
-
Save RBusarow/ec38e02ebf8062fa4c25c65cbddef8b8 to your computer and use it in GitHub Desktop.
extracting Elements from a CoroutineContext
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun lookForCoroutineContextElements(context: CoroutineContext) { | |
val job: CoroutineContext? = context[Job] | |
val interceptor: CoroutineContext? = context[ContinuationInterceptor] | |
val exceptionHandler: CoroutineContext? = context[CoroutineExceptionHandler] | |
val name: CoroutineContext? = context[CoroutineName] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment