Simplify housekeeper shutdown
The two-part shutdown procedure for the housekeeper was not needed and caused problems if SIGINT wasn't raised. Since the main thread returns to the main function, a single shutdown function is all that the housekeeper needs to function. Moved all the shutdown related code into Housekeeper::stop to remove the waiting for the thread in the destructor.
This commit is contained in:
@ -45,17 +45,7 @@ typedef bool (*TASKFN)(void *data);
|
||||
bool hkinit();
|
||||
|
||||
/**
|
||||
* Shuts down the housekeeper mechanism.
|
||||
*
|
||||
* Should be called @b only if @c hkinit() returned successfully.
|
||||
*
|
||||
* @see hkinit hkfinish
|
||||
*/
|
||||
void hkshutdown();
|
||||
|
||||
/**
|
||||
* Waits for the housekeeper thread to finish. Should be called only after
|
||||
* hkshutdown() has been called.
|
||||
* Waits for the housekeeper thread to finish.
|
||||
*/
|
||||
void hkfinish();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user