Files
hush3/src
Wladimir J. van der Laan c7f77e28f0 http: speed up shutdown
This continues/fixes #6719.

`event_base_loopbreak` was not doing what I expected it to, at least in
libevent 2.0.21.
What I expected was that it sets a timeout, given that no other pending
events it would exit in N seconds. However, what it does was delay the
event loop exit with 10 seconds, even if nothing is pending.

Solve it in a different way: give the event loop thread time to exit
out of itself, and if it doesn't, send loopbreak.

This speeds up the RPC tests a lot, each exit incurred a 10 second
overhead, with this change there should be no shutdown overhead in the
common case and up to two seconds if the event loop is blocking.

As a bonus this breaks dependency on boost::thread_group, as the HTTP
server minds its own offspring.

Zcash: cherry-picked from commit a264c32e3321ae909ca59cb8ce8bf5d812dbc4e1
2017-08-01 20:24:27 +01:00
..
2015-11-04 23:48:07 +01:00
2017-03-03 10:57:05 -08:00
2016-07-15 19:57:55 -07:00
2014-12-19 19:55:32 +01:00
2016-09-08 21:46:15 -07:00
2016-09-09 00:22:18 -06:00
2016-06-17 00:21:58 +12:00
2015-05-01 11:21:27 +00:00
2016-10-20 00:36:32 +01:00
2017-03-24 09:03:59 +13:00
2017-08-01 20:24:27 +01:00
2017-08-01 20:24:27 +01:00
2017-08-01 20:24:27 +01:00
2017-03-24 09:03:59 +13:00
2016-09-01 11:48:15 +12:00
2014-12-19 19:55:32 +01:00
2017-03-03 10:57:15 -08:00
2017-07-03 08:57:05 +01:00
2015-05-01 11:21:27 +00:00
2017-07-28 10:50:07 +00:00
2017-07-28 10:50:07 +00:00
2017-07-03 08:57:05 +01:00
2017-07-03 08:57:05 +01:00
2014-12-19 19:55:32 +01:00
2016-09-08 12:22:08 +12:00
2017-01-23 17:06:54 +01:00
2017-01-23 17:06:54 +01:00
2017-03-24 09:03:59 +13:00
2017-03-24 09:03:59 +13:00
2017-03-24 09:03:59 +13:00
2017-03-24 09:03:59 +13:00
2017-03-25 17:40:27 +13:00
2015-05-16 17:59:23 -04:00
2017-06-24 19:49:41 +01:00
2017-05-05 11:24:48 -04:00
2014-12-19 19:55:32 +01:00
2016-10-25 19:48:38 +01:00
2017-03-25 20:22:12 +13:00
2016-08-13 11:12:18 -04:00
2017-07-03 08:57:05 +01:00
2016-12-09 16:59:34 +13:00
2014-12-19 19:55:32 +01:00