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

refactor(iroh-net): replace flume in iroh-net with async_channel #2539

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

rklaehn
Copy link
Contributor

@rklaehn rklaehn commented Jul 24, 2024

Description

refactor(iroh-net): replace flume in iroh-net with async_channel

Rationale: see #2536

This is the first in a series of PRs that will replace flume with async_channel. In this case it is very close to a drop in replacement without any need for changes.

Only noteable changes:

send_async becomes send
send becomes send_blocking
Receiver implements Stream, so no need for .into_stream()
Receiver is not Unpin, so to make it unpin you need to do Box::pin(recv) or use .boxed()

Breaking Changes

None

Notes & open questions

  • Anything specific from flume we were relying on here?

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@rklaehn rklaehn requested a review from flub July 24, 2024 09:46
@rklaehn rklaehn force-pushed the iroh-net-flume-purge branch 2 times, most recently from 99dae05 to 7eb882b Compare July 24, 2024 09:52
@rklaehn rklaehn marked this pull request as ready for review July 24, 2024 10:03
Copy link
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

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

the problem with a pr like this is that you see all the crimes that are being committed with channels. but the change is basically equivalent so fine, just close my eyes.

Cargo.lock Show resolved Hide resolved
@rklaehn rklaehn added this pull request to the merge queue Jul 24, 2024
Merged via the queue into main with commit 22314a1 Jul 24, 2024
27 checks passed
@dignifiedquire dignifiedquire deleted the iroh-net-flume-purge branch July 24, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants