Skip to content

Conversation

eymar
Copy link

@eymar eymar commented Jun 17, 2022

It's a mere copy/paste from jvm sources + 2 common tests to showcase how ThreadContextElement can be used (similar to Compose Runtime needs).

It's desirable to have some common CoroutineContext.Element similar to ThreadContextElement:

Specifically, such a CoroutineContext.Element would have 2 common things with ThreadContextElement:
a function e.g. onResume(context: CoroutineContext): S, which is invoked before the coroutine in the specified context is resumed
a function e.g. onSuspend(context: CoroutineContext, oldState: S), which is invoked after the coroutine in the specified context is suspended

@dkhalanskyjb
Copy link
Contributor

Closing in favor of #4208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants