Created
July 13, 2019 20:33
-
-
Save RBusarow/f34b51572cc0bbb2d97ac5d35c0b5c67 to your computer and use it in GitHub Desktop.
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
class CoroutineContext { | |
internal val map = mutableMapOf<Key<*>, Element>() | |
operator fun <E : Element> get(key: Key<E>): E? = map[key] as? E | |
interface Key<E : Element> | |
interface Element | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment