/** * Destructor * Effects: Call the CallableThread functor before destroying the owned thread. * Remark: The CallableThread should not throw when joining the thread as the scoped variable is on a scope outside the thread function. */ ~strict_scoped_thread() { CallableThread on_destructor; on_destructor(t_); }
~thread_guard() { CallableThread on_destructor; on_destructor(t_); }