Removing the thread kill functionality.

Wasn't really used and has potential for trouble.
This commit is contained in:
Robin Sommer 2012-07-16 13:39:19 -07:00
parent f73eb3b086
commit 1ca0d970fc
3 changed files with 0 additions and 23 deletions

View file

@ -361,12 +361,6 @@ RETSIGTYPE sig_handler(int signo)
set_processing_status("TERMINATING", "sig_handler");
signal_val = signo;
if ( thread_mgr->Terminating() && (signal_val == SIGTERM || signal_val == SIGINT) )
// If the thread manager is already terminating (i.e.,
// waiting for child threads to exit), another term signal
// will send the threads a kill.
thread_mgr->KillThreads();
return RETSIGVAL;
}

View file

@ -48,14 +48,6 @@ void Manager::Terminate()
terminating = false;
}
void Manager::KillThreads()
{
DBG_LOG(DBG_THREADING, "Killing threads ...");
for ( all_thread_list::iterator i = all_threads.begin(); i != all_threads.end(); i++ )
(*i)->Kill();
}
void Manager::AddThread(BasicThread* thread)
{
DBG_LOG(DBG_THREADING, "Adding thread %s ...", thread->Name().c_str());

View file

@ -49,15 +49,6 @@ public:
*/
bool Terminating() const { return terminating; }
/**
* Immediately kills all child threads. It does however not yet join
* them, one still needs to call Terminate() for that.
*
* This method is safe to call from a signal handler, and can in fact
* be called while Terminate() is already in progress.
*/
void KillThreads();
typedef std::list<std::pair<string, MsgThread::Stats> > msg_stats_list;
/**