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

Prevent deadlocks in Peer #484

Merged
merged 1 commit into from
Jun 21, 2023
Merged

Prevent deadlocks in Peer #484

merged 1 commit into from
Jun 21, 2023

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Jun 20, 2023

We were using BUFFERED channels, with the default behavior where the sender suspends when the buffer is full (64 elements by default).

The issue is that the same coroutine receives from the input channel and emits potentially multiple events to that same channel. We would thus fill the buffer, which causes us to suspend, which stops dequeuing events, leading to a complete deadlock.

We were using BUFFERED channels, with the default behavior where the
sender suspends when the buffer is full (64 elements by default).

The issue is that the same coroutine receives from the `input` channel
and emits potentially multiple events to that same channel. We would thus
fill the buffer, which causes us to `suspend`, which stops dequeuing
events, leading to a complete deadlock.
@t-bast t-bast requested review from pm47 and dpad85 June 20, 2023 14:51
@t-bast t-bast merged commit 4b65d7a into master Jun 21, 2023
2 checks passed
@t-bast t-bast deleted the prevent-peer-deadlock branch June 21, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants