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

Added unbounded memory channels #37

Merged
merged 5 commits into from
Nov 25, 2024
Merged

Conversation

n-lebel
Copy link
Contributor

@n-lebel n-lebel commented Aug 14, 2024

This PR adds unbounded memory channels in the helpers, wrapping mpsc::UnboundedSender and mpsc::UnboundedReceiver.

@th4s
Copy link
Member

th4s commented Aug 15, 2024

Hey thanks for the PR. Is there some backstory on the reason for this PR?

@n-lebel
Copy link
Contributor Author

n-lebel commented Aug 15, 2024

Hey thanks for the PR. Is there some backstory on the reason for this PR?

I'm using serio traits for an internal project and needed to replace some UnboundedSender/Receivers with a type that implemented these traits. Seemed reasonable to open a PR here as I assume it could be useful to others too.

Copy link
Member

@th4s th4s left a comment

Choose a reason for hiding this comment

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

If we want to merge this, we should make sure that MemoryDuplex also works with the unbounded versions you introduced. Probably something like this

pub struct MemoryDuplex<Si, St> {
    sink: Si,
    stream: St
  }

CHANGELOG.md Outdated Show resolved Hide resolved
serio/src/channel.rs Outdated Show resolved Hide resolved
@th4s th4s requested a review from sinui0 August 21, 2024 10:02
@n-lebel
Copy link
Contributor Author

n-lebel commented Nov 22, 2024

@th4s Would an UnboundedMemoryDuplex also work for you? Would entail the fewest changes as I see it

Copy link
Member

@sinui0 sinui0 left a comment

Choose a reason for hiding this comment

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

lgtm modulo the function doc. Thanks!

serio/src/channel.rs Outdated Show resolved Hide resolved
@n-lebel n-lebel requested review from sinui0 and th4s November 25, 2024 16:03
Copy link
Member

@sinui0 sinui0 left a comment

Choose a reason for hiding this comment

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

ty!

@sinui0 sinui0 merged commit 280bb38 into tlsnotary:dev Nov 25, 2024
2 checks passed
@n-lebel n-lebel deleted the unbounded-channels branch November 25, 2024 16:27
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.

3 participants