Ensure we cancel and end the manager per thread.