-
Notifications
You must be signed in to change notification settings - Fork 54
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
Start removing allFutures #125
Conversation
btw @cheatfate would be nice if we mark deprecate |
For now blocked by status-im/nim-chronos#87 |
libp2p/muxers/mplex/lpchannel.nim
Outdated
s.cleanUp() | ||
) | ||
|
||
for res in futs: |
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.
this seems pretty repetitive, can we perhaps move this to a template, are they sufficiently similar to be able to generalize?
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.
LGTM, but a few comments.
- First, the error handling code is repetitive and can probably be generalized into a couple of templates, specially in
LPChannel
. - Second, all the error checking code does is fail/report the first exception. This seems like the most common pattern and an indication that this should be moved into
allFinished
or anotherallXXX
primitive, that will simply do the same.
Just by removing a few in
lpchannel
and useawaitne
I finally realized how the program flow worked and specially each test termination... (check any CI to see yourself!)