Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Flow's CoroutineContext's dispatcher as listener Executor #201

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

jeffdgr8
Copy link
Collaborator

If no explicit Executor is provided to listener Flows, use the Flow's CoroutineDispatcher as the listener Executor.

@bmeike
Copy link
Contributor

bmeike commented Aug 4, 2023

This is really great!!

I'm very hesitant about adding the @file:OptIn(ExperimentalStdlibApi::class). I'm going to put it on master with a comment that says it must come out of any release. Hopefully, by the time we put out the next release, it won't be necessary.

@jeffdgr8
Copy link
Collaborator Author

jeffdgr8 commented Aug 7, 2023

@bmeike from what I can tell, this opt-in annotation has been required since the AbstractCoroutineContextKey API was introduced in Kotlin 1.3. It hasn't changed since then and it's not clear why it still requires the experimental opt-in. Almost certainly the API won't be going away and worst case it would be deprecated with a replacement API first. I asked the original author for more info.

@bmeike
Copy link
Contributor

bmeike commented Aug 14, 2023

https://issues.couchbase.com/browse/CBL-4828

@bmeike bmeike changed the base branch from master to flows August 15, 2023 23:34
@bmeike bmeike merged commit aec7ff1 into couchbase:flows Aug 15, 2023
bmeike added a commit that referenced this pull request Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants