-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add threadpool to join the recovery threads #316
Conversation
Any specific reason for adding another crate for thread handling? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #316 +/- ##
==========================================
- Coverage 78.26% 78.18% -0.08%
==========================================
Files 32 32
Lines 4840 4859 +19
==========================================
+ Hits 3788 3799 +11
- Misses 1052 1060 +8 ☔ View full report in Codecov by Sentry. |
I tried implementing the methods from |
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.
The approach looks fine to me. However, since you are now adding the threadPool
field to the Maker
struct, ensure that this field is used consistently for all instances of the thread pool within Maker
. In the Maker
server, there is a local thread pool—please ensure you use this thread pool there as well. Additionally, you missed joining a thread in the Maker
handler. Address these issues, and this PR will be good to go.
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.
PartialACK.
Here are the list of review comments focusing on handling the threads and related errors in much better way.
|
Also there are many instances in codebase where we are not handling the thread's error correctly -> so we incorporate those enhancements in this pr itself? coinswap/tests/test_framework/mod.rs Lines 146 to 149 in 6e5ce00
Here unwraping the |
I appreciate the efforts put to review this PR by @KnowWhoami, but I disagree with the most of the review. I thought of addressing the review in The review suggests complete structural changes without clear The suggested changes include harder to maintain alternatives, without any PS: I'm always open to constructive feedback and improvements. |
@claddyy just add inline to join_all and the PR is good to go. |
a9ea6ce
to
a96ac49
Compare
- implement drop trait - replace local threadpools from maker server - restructure error handling in server
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.
ACK
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 like the structure. Ack.
Below is one non-blocking comment. Can be done in a followup PR too, but will be good to have to help for debugging later.
Not needed for the test framework. The only other place where it makes sense is the DNS server when it creates the rpc thread. But not a major need as DNS is not user facing. |
Merging this to unblock downstream works. |
Addressed the review here #324. |
Fixes #284