diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-09-25 13:49:08 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-09-28 15:06:20 +0200 |
| commit | de9de2de361ab1355b976f17371d73e36fe3bf56 (patch) | |
| tree | d7e9a1c8c8b0cf6ecb5e789d85235e0a1304f161 /src/bench/bench.cpp | |
| parent | Make HTTP server shutdown more graceful (diff) | |
| download | discoin-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