Skip to content

Conversation

camshaft
Copy link
Contributor

@camshaft camshaft commented Feb 28, 2025

Description of changes:

The current s2n_quic_dc::sync only exports a single mpmc channel. This change refactors the channel implementation to provide both a mpmc and mpsc channel for use cases where there will only be one receiver. This implementation can be a bit cheaper since it uses the existing Mutex around the ring_deque to store the receiver waker.

Testing:

I added some high level tests showing that both channel implementations are working as expected.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@camshaft camshaft force-pushed the camshaft/dc-sync-mpsc branch from 513bbba to eb83091 Compare February 28, 2025 20:31
@camshaft camshaft marked this pull request as ready for review February 28, 2025 20:33
tokio = ["tokio/io-util", "tokio/net", "tokio/rt-multi-thread", "tokio/time"]

[dependencies]
arrayvec = "0.7"
atomic-waker = "1"
aws-lc-rs = "1"
bach = "0.0.10"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dev-dependency? I don't see any usage outside of testing... although maybe testing is public?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, you're absolutely right. I will fix that in a follow-up

@camshaft camshaft merged commit 4d60027 into main Mar 4, 2025
131 checks passed
@camshaft camshaft deleted the camshaft/dc-sync-mpsc branch March 4, 2025 15:37
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