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

[Feature Request] Remove active waiting from hivemind.P2P initialization #300

Closed
justheuristic opened this issue Jun 30, 2021 · 0 comments · Fixed by #343
Closed

[Feature Request] Remove active waiting from hivemind.P2P initialization #300

justheuristic opened this issue Jun 30, 2021 · 0 comments · Fixed by #343
Labels
enhancement New feature or request refactor Resolving technical debt

Comments

@justheuristic
Copy link
Member

As discussed in #299 , current hivemind.P2P will connect to a running daemon over several retries and wait a fixed 0.4 * 2 ** num_retries seconds between retries.

This is suboptimal, as we will likely loose loose time sleeping after p2pd has already been initialized.

A better strategy is to modify p2pd so that it notifies the master process of successful initialization and simply await for that notification (or timeout).

@justheuristic justheuristic added enhancement New feature or request refactor Resolving technical debt labels Jun 30, 2021
borzunov added a commit that referenced this issue Aug 3, 2021
This PR resolves #300 and speeds up the creation of P2P clients by reading the daemon's stdout instead of pinging it repeatedly.

Co-authored-by: Denis Mazur <[email protected]>
Co-authored-by: Alexander Borzunov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Resolving technical debt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant