Also flush the callback queue when the callback thread should quit