Skip to content

Lost send in Channel during close #359

Closed
@qwwdfsad

Description

@qwwdfsad

The following code may lose send coroutine:

T1: channel.send()
T2 channel.receive(); channel.close()

close is not atomic and can be considered as two actions: "remove and cancel waiting receivers" and "add closed token". If send occurs between these actions, send will be stuck in the channel

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions