mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 03:12:27 +00:00
virtio-devices: Upon reset reap/join the device threads
We have killed the device thread by writing to the exit EventFd but we should wait for them to quit to ensure consistency. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
ef363d79fb
commit
22649c4a87
@ -299,6 +299,14 @@ impl VirtioCommon {
|
||||
let _ = kill_evt.write(1);
|
||||
}
|
||||
|
||||
if let Some(mut threads) = self.epoll_threads.take() {
|
||||
for t in threads.drain(..) {
|
||||
if let Err(e) = t.join() {
|
||||
error!("Error joining thread: {:?}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Return the interrupt and queue EventFDs
|
||||
Some((
|
||||
self.interrupt_cb.take().unwrap(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user