resolve the problem that io_service can not exit normal when it is running in other thread