Skip to content

Unlimited channel doesn't correctly invoke onUndeliveredElement on cancellation #2435

@qwwdfsad

Description

@qwwdfsad

Reproducer:

 val channelBuffered = Channel<Int>(10) { println("RELEASE[BUFFER]: $it") }
 val channelUnlimited = Channel<Int>(Channel.UNLIMITED) { println("RELEASE[UNLIMITED]: $it") }
 repeat(5) {
     channelBuffered.offer(it)
     channelUnlimited.offer(it)
 }
 channelBuffered.cancel()
 channelUnlimited.cancel()

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions