Use asio signal handling in Application (RIPD-140):

* Use signal_set as cross platform way of handling SIGINT
* Remove polling on main thread for shutdown.
* Add extra logging for received signal.
* Clean up exit handling on error in setup routines.
* Reuse isStopped() from Stoppable for status (could be isStopping() instead).
* Ctrl-C should now work for standalone mode as well on Windows.

Also small fixes to Resolver:
* Add Resolver prefix to logging.
* Fix AsyncObject::removeReference() logic.
* Fix work remaining logic.
This commit is contained in:
Donovan Hide
2014-11-19 19:17:08 +00:00
committed by Nik Bougalis
parent 670401884c
commit 2288ab48b9
3 changed files with 39 additions and 78 deletions

View File

@@ -286,7 +286,7 @@ public:
"Queued new job with " << names.size() <<
" tasks. " << m_work.size() << " jobs outstanding.";
if (m_work.size() == 1)
if (m_work.size() > 0)
{
m_io_service.post (m_strand.wrap (std::bind (
&ResolverAsioImpl::do_work, this,