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

feat: don't run 'dht_nice_tick()' when kadmelia is disabled #242

Merged
merged 1 commit into from
Sep 24, 2022

Conversation

fabricedesre
Copy link
Contributor

No description provided.

@fabricedesre
Copy link
Contributor Author

@dignifiedquire the last commit moves the dht tick timer to its own select!() block that only runs when kadmelia is enabled. That changes a but the loop semantics when kadmelia is enabled but I think that's fine.

@dignifiedquire
Copy link
Contributor

This should work: tokio-rs/tokio#2583 (comment)

@fabricedesre
Copy link
Contributor Author

This should work: tokio-rs/tokio#2583 (comment)

so which commit do you prefer?

@dignifiedquire
Copy link
Contributor

no strong preference, but the OptionFuture looks a little cleaner I think

@fabricedesre
Copy link
Contributor Author

no strong preference, but the OptionFuture looks a little cleaner I think

ok. I'm taking a look, but the loop and the fact that we don't deal with a single future but with tick() creating a new one for each call makes that not so straightforward.

@fabricedesre
Copy link
Contributor Author

Alright, I think I'm quite happy with this version.

@dignifiedquire dignifiedquire merged commit 050ad48 into n0-computer:main Sep 24, 2022
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