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

Confused about Multi.asFlow extension #1316

Open
hantsy opened this issue Jul 10, 2023 · 4 comments
Open

Confused about Multi.asFlow extension #1316

hantsy opened this issue Jul 10, 2023 · 4 comments
Assignees
Labels
Kotlin Kotlin support

Comments

@hantsy
Copy link

hantsy commented Jul 10, 2023

Kotlinx coroutines Reactive includes an general extension fun to convert Publisher to Kotlin Flow, https://github.com/Kotlin/kotlinx.coroutines/blob/master/reactive/kotlinx-coroutines-reactive/src/ReactiveFlow.kt

Besides add extensions to general ReactiveStreams API, https://github.com/Kotlin/kotlinx.coroutines/tree/master/reactive it also supports Reactor, Rxjava2/3, JDK 9 Flow API.

But in these implementations, it does requires a suspend modifier for fun .asFlow.

@jponge
Copy link
Member

jponge commented Jul 10, 2023

/cc @heubeck

@heubeck
Copy link
Collaborator

heubeck commented Jul 10, 2023

Thank you for pointing this out, @hantsy.
Mutiny-Kotlin was created before Mutiny switched to the Publisher API.

Will have a look and probably propose a refactoring.

@heubeck heubeck self-assigned this Jul 10, 2023
@hantsy
Copy link
Author

hantsy commented Jul 10, 2023

@heubeck
Copy link
Collaborator

heubeck commented Jul 25, 2023

lets follow up on this discussion in #1325

jponge added a commit that referenced this issue Jul 25, 2023
Issue #1316: Kotlin - Remove unnecessary suspend modifier from asFlow and Uni builder
@jponge jponge added the Kotlin Kotlin support label Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kotlin Kotlin support
Projects
None yet
Development

No branches or pull requests

3 participants