Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented May 28, 2020

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.

MarcoFalke added 2 commits May 28, 2020 09:00
No longer needed after commit d61f2bb
The common setup is included in virtually all tests, so it should be
as slim as possible.
@practicalswift
Copy link
Contributor

Concept ACK

Copy link
Contributor

@ajtowns ajtowns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

MarcoFalke added 2 commits May 28, 2020 10:22
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.
@maflcko maflcko force-pushed the 2005-schedulerCleanup branch from fa5645b to fae1ef5 Compare May 28, 2020 14:38
Copy link
Contributor

@jnewbery jnewbery left a 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

@maflcko
Copy link
Member Author

maflcko commented May 28, 2020

Removed some more code as requested by @jnewbery

MarcoFalke added 2 commits May 28, 2020 19:28
This helps understanding the code at the call site without having to
look up the name of the argument or the default value.
@maflcko maflcko force-pushed the 2005-schedulerCleanup branch from fa9bdf9 to fa197f1 Compare May 28, 2020 23:29
@maflcko
Copy link
Member Author

maflcko commented May 28, 2020

Reverted back to the previous version for a smaller diff

@jnewbery
Copy link
Contributor

reACK fa197f1

only change is renaming StopImmediately() to stop() (presumably so StopWhenDrained() can be removed in a follow-up PR.

Reverted back to the previous version for a smaller diff

Good. My original suggestion was to remove StopWhenDrained() in a follow-up. No need to do everything in one PR.

maflcko pushed a commit to bitcoin-core/gui that referenced this pull request Jun 21, 2020
…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
@maflcko maflcko force-pushed the 2005-schedulerCleanup branch from fa197f1 to fa8337f Compare June 21, 2020 10:03
@maflcko
Copy link
Member Author

maflcko commented Jun 21, 2020

Force pushed last commit, but should be trivial to re-review with git range-diff bitcoin-core/master --word-diff-regex=. A B

@jnewbery
Copy link
Contributor

utACK fa8337f

@maflcko maflcko merged commit 3a4a372 into bitcoin:master Jun 25, 2020
@maflcko maflcko deleted the 2005-schedulerCleanup branch June 25, 2020 14:38
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 7, 2020
…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
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 8, 2020
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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 27, 2021
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 28, 2021
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 29, 2021
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 15, 2021
…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
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Aug 27, 2021
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
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Aug 27, 2021
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
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Aug 27, 2021
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
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Aug 27, 2021
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
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Aug 27, 2021
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
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Aug 27, 2021
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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 28, 2021
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.
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 28, 2021
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.
kwvg pushed a commit to kwvg/dash that referenced this pull request Oct 12, 2021
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.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants