-
Notifications
You must be signed in to change notification settings - Fork 159
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)!: remove async channel #2620
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2620/docs/iroh/ Last updated: 2024-08-14T06:29:46Z |
(note: should this be try_send?
rklaehn
changed the title
Remove async channel from iroh net
refactor(iroh-net)!: remove async channel
Aug 13, 2024
iroh-net/Cargo.toml
Outdated
@@ -127,7 +130,7 @@ harness = false | |||
duct = "0.13.6" | |||
|
|||
[features] | |||
default = ["metrics"] | |||
default = ["metrics", "local_swarm_discovery", "iroh-relay"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only added this for testing, please undo
dignifiedquire
approved these changes
Aug 13, 2024
# Conflicts: # iroh-net/src/discovery/local_swarm_discovery.rs
rklaehn
force-pushed
the
remove-async-channel-from-iroh-net
branch
from
August 14, 2024 06:29
fc2f7f6
to
3eef78a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Removes async-channel from iroh-net and replaces it with the tokio mpsc channel.
This is a mergeable version of #2614
Breaking Changes
LocalSwarmDiscovery is no longer UnwindSafe
Notes & open questions
Open question: I am using blocking_send from inside the windows RouteMonitor. This depends on that the callback thread is not a tokio thread. I have no idea if this is a reasonable assumption to make. Otherwise we would have to bring back the runtime check condition or just capture a runtime handle and spawn a task.
Note: what even is this? The only message there is is NetworkMessage::Change, and there is no timestamp or anything. So could I just use try_send? If the queue is full, there is already a Change in it, so it is as good as the new one...
Change checklist