diff --git a/hgdriver/hgdev/hg_scanner.cpp b/hgdriver/hgdev/hg_scanner.cpp index 5044c51..da51dbe 100644 --- a/hgdriver/hgdev/hg_scanner.cpp +++ b/hgdriver/hgdev/hg_scanner.cpp @@ -3635,6 +3635,9 @@ int hg_scanner::save_usb_data(std::shared_ptr data) int ret = SCANNER_ERR_OK; unsigned int bytes = data->size(); + if (user_cancel_) + std::this_thread::sleep_for(std::chrono::milliseconds(0)); // make CPU switch thread ... + usb_img_index_++; VLOG_MINI_3(LOG_LEVEL_DEBUG_INFO, "USB packet(%04d) of picture with %u bytes(status: %d)\n", usb_img_index_, data->size(), data->get_image_statu()); if (dump_usb_path_.length()) //这两台设备不是jpg的图 所以不能直接处理