Convert thread stop handling into a publish/subscribe model