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

Flux onBackpressureDrop and coroutines collect extension does not called passed lambda #1267

Closed
denyshorman opened this issue Jun 10, 2019 · 1 comment
Assignees
Labels

Comments

@denyshorman
Copy link

Simple code with coroutines and project reactor does not produce any values:

Expected: "test" printed
Actual: don't see any output on the console

Kotlin coroutines version: 1.2.1

import kotlinx.coroutines.reactive.collect
import kotlinx.coroutines.runBlocking
import reactor.core.publisher.Flux

fun main(args: Array<String>) {
    runBlocking {
        Flux.never<Long>()
            .startWith(0)
            .onBackpressureDrop()
            .collect {
                println("test")
            }
    }
}
@elizarov elizarov added the flow label Jun 10, 2019
elizarov added a commit that referenced this issue Jun 18, 2019
This makes Publisher.collect consistent with Publisher.asFlowable and
ensures smooth integration with reactive backpressure operators
"out of the box".

Fixes #1267
@elizarov
Copy link
Contributor

Good catch. Thanks for the report.

@elizarov elizarov self-assigned this Jun 18, 2019
elizarov added a commit that referenced this issue Jun 18, 2019
This makes Publisher.collect consistent with Publisher.asFlow and
ensures smooth integration with reactive backpressure operators
"out of the box".

Fixes #1267
elizarov added a commit that referenced this issue Jun 18, 2019
This makes Publisher.collect consistent with Publisher.asFlow and
ensures smooth integration with reactive backpressure operators
"out of the box".

Fixes #1267
elizarov added a commit that referenced this issue Jun 19, 2019
This makes Publisher.collect consistent with Publisher.asFlow and
ensures smooth integration with reactive backpressure operators
"out of the box".

Fixes #1267
elizarov added a commit that referenced this issue Jun 20, 2019
This makes Publisher.collect consistent with Publisher.asFlow and
ensures smooth integration with reactive backpressure operators
"out of the box".

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

No branches or pull requests

2 participants