aboutsummaryrefslogtreecommitdiff
path: root/src/bench/bench.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2015-09-25 13:49:08 +0200
committerWladimir J. van der Laan <[email protected]>2015-09-28 15:06:20 +0200
commitde9de2de361ab1355b976f17371d73e36fe3bf56 (patch)
treed7e9a1c8c8b0cf6ecb5e789d85235e0a1304f161 /src/bench/bench.cpp
parentMake HTTP server shutdown more graceful (diff)
downloaddiscoin-de9de2de361ab1355b976f17371d73e36fe3bf56.tar.xz
discoin-de9de2de361ab1355b976f17371d73e36fe3bf56.zip
http: Wait for worker threads to exit
Add a WaitExit() call to http's WorkQueue to make it delete the work queue only when all worker threads stopped. This fixes a problem that was reproducable by pressing Ctrl-C during AppInit2: ``` /usr/include/boost/thread/pthread/condition_variable_fwd.hpp:81: boost::condition_variable::~condition_variable(): Assertion `!ret' failed. /usr/include/boost/thread/pthread/mutex.hpp:108: boost::mutex::~mutex(): Assertion `!posix::pthread_mutex_destroy(&m)' failed. ``` I was assuming that `threadGroup->join_all();` would always have been called when entering the Shutdown(). However this is not the case in bitcoind's AppInit2-non-zero-exit case "was left out intentionally here".
Diffstat (limited to 'src/bench/bench.cpp')
0 files changed, 0 insertions, 0 deletions