-
Notifications
You must be signed in to change notification settings - Fork 37.7k
refactor: Misc scheduler cleanups #19090
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
Conversation
No longer needed after commit d61f2bb
The common setup is included in virtually all tests, so it should be as slim as possible.
Concept 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.
Concept ACK
After commit d0ebd93 the scheduler itself no longer cares if the serviceQueue is run in a std::thread or boost::thread. Change the documentation to std::thread because we switched to C++11.
fa5645b
to
fae1ef5
Compare
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.
Code review ACK fae1ef5
fae1ef5
to
fa9bdf9
Compare
Removed some more code as requested by @jnewbery |
This helps understanding the code at the call site without having to look up the name of the argument or the default value.
fa9bdf9
to
fa197f1
Compare
Reverted back to the previous version for a smaller diff |
reACK fa197f1 only change is renaming
Good. My original suggestion was to remove |
…ion declarations and calls cc29d1e [tools] Update clang-format config (John Newbery) Pull request description: In some cases, running clang-format has made code _less_ readable by joining declarations and calls for functions with many arguments into very long lines. For example: ``` - size_t getQueueInfo(std::chrono::system_clock::time_point &first, - std::chrono::system_clock::time_point &last) const; + size_t getQueueInfo(std::chrono::system_clock::time_point& first, std::chrono::system_clock::time_point& last) const; ``` (bitcoin/bitcoin#19090 (comment)) This change to clang-format would allow arguments/parameters for func declarations/calls to be split over multiple lines, aligned with the opening parens. It does not force args/params to be on new lines (that setting is `BinPackParameters : true`). ACKs for top commit: MarcoFalke: ACK cc29d1e fine with me practicalswift: ACK cc29d1e Tree-SHA512: a62474925e71aaff41bdce7960fd5ffd64317da810f694d8084080b054708cf71c2ab2ce3111db5a9260d1c1f9e02d59a2ecb5543b1b6172ce085cb42432160a
Can easily be reviewed with the git options --ignore-all-space --word-diff-regex=. -U0
fa197f1
to
fa8337f
Compare
Force pushed last commit, but should be trivial to re-review with |
utACK fa8337f |
…e function declarations and calls cc29d1e [tools] Update clang-format config (John Newbery) Pull request description: In some cases, running clang-format has made code _less_ readable by joining declarations and calls for functions with many arguments into very long lines. For example: ``` - size_t getQueueInfo(std::chrono::system_clock::time_point &first, - std::chrono::system_clock::time_point &last) const; + size_t getQueueInfo(std::chrono::system_clock::time_point& first, std::chrono::system_clock::time_point& last) const; ``` (bitcoin#19090 (comment)) This change to clang-format would allow arguments/parameters for func declarations/calls to be split over multiple lines, aligned with the opening parens. It does not force args/params to be on new lines (that setting is `BinPackParameters : true`). ACKs for top commit: MarcoFalke: ACK cc29d1e fine with me practicalswift: ACK cc29d1e Tree-SHA512: a62474925e71aaff41bdce7960fd5ffd64317da810f694d8084080b054708cf71c2ab2ce3111db5a9260d1c1f9e02d59a2ecb5543b1b6172ce085cb42432160a
fa8337f clang-format scheduler (MarcoFalke) fa3d41b doc: Switch scheduler to doxygen comments (MarcoFalke) fac43f9 scheduler: Replace stop(true) with StopWhenDrained() (MarcoFalke) fa9cca0 doc: Remove unused documentation about unimplemented features (MarcoFalke) fab2950 doc: Switch boost::thread to std::thread in scheduler (MarcoFalke) fa98196 test: Remove unused scheduler.h include from the common setup (MarcoFalke) fa609c4 scheduler: Remove unused REVERSE_LOCK (MarcoFalke) Pull request description: This accumulates a bunch of cleanup that was long overdue, but I haven't yet gotten around to address. Specifically, but not limited to: * Remove unused code, documentation and includes * Upgrade to doxygen documentation Please refer to the individual commits for more details. ACKs for top commit: jnewbery: utACK fa8337f Tree-SHA512: 0c825ad9767e2697a3ef1ec1be13fdc2b18eeb7493ad0be5b65cc9f209391e78b17ee66e35e094c5e171c12b0f1624f287a110f6bddaf3024b708877afa8552e
…e function declarations and calls cc29d1e [tools] Update clang-format config (John Newbery) Pull request description: In some cases, running clang-format has made code _less_ readable by joining declarations and calls for functions with many arguments into very long lines. For example: ``` - size_t getQueueInfo(std::chrono::system_clock::time_point &first, - std::chrono::system_clock::time_point &last) const; + size_t getQueueInfo(std::chrono::system_clock::time_point& first, std::chrono::system_clock::time_point& last) const; ``` (bitcoin#19090 (comment)) This change to clang-format would allow arguments/parameters for func declarations/calls to be split over multiple lines, aligned with the opening parens. It does not force args/params to be on new lines (that setting is `BinPackParameters : true`). ACKs for top commit: MarcoFalke: ACK cc29d1e fine with me practicalswift: ACK cc29d1e Tree-SHA512: a62474925e71aaff41bdce7960fd5ffd64317da810f694d8084080b054708cf71c2ab2ce3111db5a9260d1c1f9e02d59a2ecb5543b1b6172ce085cb42432160a
…e function declarations and calls cc29d1e [tools] Update clang-format config (John Newbery) Pull request description: In some cases, running clang-format has made code _less_ readable by joining declarations and calls for functions with many arguments into very long lines. For example: ``` - size_t getQueueInfo(std::chrono::system_clock::time_point &first, - std::chrono::system_clock::time_point &last) const; + size_t getQueueInfo(std::chrono::system_clock::time_point& first, std::chrono::system_clock::time_point& last) const; ``` (bitcoin#19090 (comment)) This change to clang-format would allow arguments/parameters for func declarations/calls to be split over multiple lines, aligned with the opening parens. It does not force args/params to be on new lines (that setting is `BinPackParameters : true`). ACKs for top commit: MarcoFalke: ACK cc29d1e fine with me practicalswift: ACK cc29d1e Tree-SHA512: a62474925e71aaff41bdce7960fd5ffd64317da810f694d8084080b054708cf71c2ab2ce3111db5a9260d1c1f9e02d59a2ecb5543b1b6172ce085cb42432160a
…e function declarations and calls cc29d1e [tools] Update clang-format config (John Newbery) Pull request description: In some cases, running clang-format has made code _less_ readable by joining declarations and calls for functions with many arguments into very long lines. For example: ``` - size_t getQueueInfo(std::chrono::system_clock::time_point &first, - std::chrono::system_clock::time_point &last) const; + size_t getQueueInfo(std::chrono::system_clock::time_point& first, std::chrono::system_clock::time_point& last) const; ``` (bitcoin#19090 (comment)) This change to clang-format would allow arguments/parameters for func declarations/calls to be split over multiple lines, aligned with the opening parens. It does not force args/params to be on new lines (that setting is `BinPackParameters : true`). ACKs for top commit: MarcoFalke: ACK cc29d1e fine with me practicalswift: ACK cc29d1e Tree-SHA512: a62474925e71aaff41bdce7960fd5ffd64317da810f694d8084080b054708cf71c2ab2ce3111db5a9260d1c1f9e02d59a2ecb5543b1b6172ce085cb42432160a
…e function declarations and calls cc29d1e [tools] Update clang-format config (John Newbery) Pull request description: In some cases, running clang-format has made code _less_ readable by joining declarations and calls for functions with many arguments into very long lines. For example: ``` - size_t getQueueInfo(std::chrono::system_clock::time_point &first, - std::chrono::system_clock::time_point &last) const; + size_t getQueueInfo(std::chrono::system_clock::time_point& first, std::chrono::system_clock::time_point& last) const; ``` (bitcoin#19090 (comment)) This change to clang-format would allow arguments/parameters for func declarations/calls to be split over multiple lines, aligned with the opening parens. It does not force args/params to be on new lines (that setting is `BinPackParameters : true`). ACKs for top commit: MarcoFalke: ACK cc29d1e fine with me practicalswift: ACK cc29d1e Tree-SHA512: a62474925e71aaff41bdce7960fd5ffd64317da810f694d8084080b054708cf71c2ab2ce3111db5a9260d1c1f9e02d59a2ecb5543b1b6172ce085cb42432160a
…e function declarations and calls cc29d1e [tools] Update clang-format config (John Newbery) Pull request description: In some cases, running clang-format has made code _less_ readable by joining declarations and calls for functions with many arguments into very long lines. For example: ``` - size_t getQueueInfo(std::chrono::system_clock::time_point &first, - std::chrono::system_clock::time_point &last) const; + size_t getQueueInfo(std::chrono::system_clock::time_point& first, std::chrono::system_clock::time_point& last) const; ``` (bitcoin#19090 (comment)) This change to clang-format would allow arguments/parameters for func declarations/calls to be split over multiple lines, aligned with the opening parens. It does not force args/params to be on new lines (that setting is `BinPackParameters : true`). ACKs for top commit: MarcoFalke: ACK cc29d1e fine with me practicalswift: ACK cc29d1e Tree-SHA512: a62474925e71aaff41bdce7960fd5ffd64317da810f694d8084080b054708cf71c2ab2ce3111db5a9260d1c1f9e02d59a2ecb5543b1b6172ce085cb42432160a
…e function declarations and calls cc29d1e [tools] Update clang-format config (John Newbery) Pull request description: In some cases, running clang-format has made code _less_ readable by joining declarations and calls for functions with many arguments into very long lines. For example: ``` - size_t getQueueInfo(std::chrono::system_clock::time_point &first, - std::chrono::system_clock::time_point &last) const; + size_t getQueueInfo(std::chrono::system_clock::time_point& first, std::chrono::system_clock::time_point& last) const; ``` (bitcoin#19090 (comment)) This change to clang-format would allow arguments/parameters for func declarations/calls to be split over multiple lines, aligned with the opening parens. It does not force args/params to be on new lines (that setting is `BinPackParameters : true`). ACKs for top commit: MarcoFalke: ACK cc29d1e fine with me practicalswift: ACK cc29d1e Tree-SHA512: a62474925e71aaff41bdce7960fd5ffd64317da810f694d8084080b054708cf71c2ab2ce3111db5a9260d1c1f9e02d59a2ecb5543b1b6172ce085cb42432160a
Summary: > No longer needed after [[bitcoin/bitcoin#17270 | core#17270]] This is a backport of [[bitcoin/bitcoin#19090 | core#19090]] [1/6] bitcoin/bitcoin@fa609c4 Backport note: the original PR has 7 commits, but the last one is not relevant to our codebase. Test Plan: With tsan: `ninja check` Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9955
Summary: The common setup is included in virtually all tests, so it should be as slim as possible. This is a backport of [[bitcoin/bitcoin#19090 | core#19090]] [2/7] bitcoin/bitcoin@fa98196 Test Plan: `ninja check` Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9956
Summary: > After [[bitcoin/bitcoin#18234 | core#18234]] the scheduler itself no longer cares if the > serviceQueue is run in a std::thread or boost::thread. Change the > documentation to std::thread because we switched to C++11. This is a backport of [[bitcoin/bitcoin#19090 | core#19090]] [3/6] bitcoin/bitcoin@fab2950 Test Plan: Proofreading Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9957
Summary: This is a backport of [[bitcoin/bitcoin#19090 | core#19090]] [4/6] bitcoin/bitcoin@fa9cca0 Test Plan: NA Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9958
Summary: This helps understanding the code at the call site without having to look up the name of the argument or the default value. This is a backport of [[bitcoin/bitcoin#19090 | core#19090]] [5/6] bitcoin/bitcoin@fac43f9 Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9959
Summary: This is a backport of [[bitcoin/bitcoin#19090 | core#19090]] [6/6] bitcoin/bitcoin@fa3d41b Test Plan: Proofreading Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9960
backports bitcoin/bitcoin@fab2950 doc: Switch boost::thread to std::thread in scheduler After commit d0ebd93 the scheduler itself no longer cares if the serviceQueue is run in a std::thread or boost::thread. Change the documentation to std::thread because we switched to C++11.
backports bitcoin/bitcoin@fab2950 doc: Switch boost::thread to std::thread in scheduler After commit d0ebd93 the scheduler itself no longer cares if the serviceQueue is run in a std::thread or boost::thread. Change the documentation to std::thread because we switched to C++11.
backports bitcoin/bitcoin@fab2950 doc: Switch boost::thread to std::thread in scheduler After commit d0ebd93 the scheduler itself no longer cares if the serviceQueue is run in a std::thread or boost::thread. Change the documentation to std::thread because we switched to C++11.
This accumulates a bunch of cleanup that was long overdue, but I haven't yet gotten around to address. Specifically, but not limited to:
Please refer to the individual commits for more details.