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
1 changed files with 8 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue