扫描线程未结束时关闭扫描仪,等待扫描线程结束
This commit is contained in:
parent
585e1ef499
commit
8ac6cbbe6e
|
@ -2462,6 +2462,8 @@ int hg_scanner::close(bool force)
|
|||
{
|
||||
LOG_INFO(LOG_LEVEL_WARNING, "close scanner: USB thread or Image thread is still running.\n");
|
||||
io_->close();
|
||||
while (scan_life_)
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(5));
|
||||
io_->release();
|
||||
io_ = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue