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

Implement signaling on protocol methods replacing sleeping gorutines. #180

Closed
CPerezz opened this issue Dec 5, 2019 · 0 comments
Closed
Assignees
Labels
status:invalid covers obsolete tasks, nonsensical issues, stuff that don't make sense (anymore)

Comments

@CPerezz
Copy link
Contributor

CPerezz commented Dec 5, 2019

Derived from this discussion of #141:

I am not convinced by your explanation. Either the process is synchronous (I send a findNodes request and I wait for some kind of side effect, like a response that may or may not be related to the message I broadcasted) and therefore the process should block until some condition is met (whatever the condition). In case the process is instead asynchronous, sendFindNodes should follow a fire-and-forget model (and therefore there should be no followup in the same thread/goroutine basically). In both cases, the sleep is inappropriate.

I think that what you want might be an heuristic condition, best modeled with a sync.WaitGroup

Originally posted by @autholykos in #141

We decided that using sync.WaitGroup might be a better solution for the steps done in protocol.go -> Bootstrapping and Network_Discovery.

@CPerezz CPerezz self-assigned this Dec 5, 2019
@CPerezz CPerezz added the status:invalid covers obsolete tasks, nonsensical issues, stuff that don't make sense (anymore) label Dec 5, 2019
@CPerezz CPerezz closed this as completed Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:invalid covers obsolete tasks, nonsensical issues, stuff that don't make sense (anymore)
Projects
None yet
Development

No branches or pull requests

1 participant