HomePhabricator

Merge #12366: http: Join worker threads before deleting work queue

Description

Merge #12366: http: Join worker threads before deleting work queue

Summary:
11e0151 http: Remove numThreads and ThreadCounter (Wladimir J. van der Laan)
f946654 http: Remove WaitExit from WorkQueue (Wladimir J. van der Laan)
b1c2370 http: Join worker threads before deleting work queue (Wladimir J. van der Laan)

Pull request description:

This prevents a potential race condition if control flow ends up in
`ShutdownHTTPServer` before the thread gets to `queue->Run()`,
deleting the work queue while workers are still going to use it.

Meant to fix #12362.

Tree-SHA512: 8108514aeee5b2067a3736ed028014b580d1cbf8530ac7682b8a23070133dfa1ca21db4358c9158ea57e8811e0551395b6cb769887876b9cfce067ee968d0642

Backport Core PR12366
https://github.com/bitcoin/bitcoin/pull/12366/files
Completes T539

Test Plan:
ninja check check-functional
make check

Reviewers: deadalnix, Fabien, #bitcoin_abc, markblundeberg

Reviewed By: #bitcoin_abc, markblundeberg

Subscribers: markblundeberg, teamcity, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2547

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Feb 21 2019, 18:31
jasonbcoxCommitted on Feb 21 2019, 18:47
jasonbcoxPushed on Feb 21 2019, 21:53
Reviewer
Restricted Project
Differential Revision
D2547: Merge #12366: http: Join worker threads before deleting work queue
Parents
rSTAGING3c0491f33cc4: Add bitcoin-qt testing explicitly to the releease process
Branches
Unknown
Tags
Unknown