virtio-devices: properly join all threads on Drop

This change is important to do a proper resource cleanup. We decided
to do this repetitive approach as VirtioCommon can't implement Drop
without major changes to the corresponding code. Also, devices such as
Net can't easily use the epoll_threads-abstraction from VirtioCommon as
it has multiple threads with different semantics.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
(cherry picked from commit ad6c0ee52b)
This commit is contained in:
Philipp Schuster
2023-01-12 10:07:55 +01:00
committed by Bo Chen
parent 8dd4d42053
commit 1adfb7e9f8
13 changed files with 39 additions and 0 deletions

View File

@@ -396,6 +396,7 @@ where
// Ignore the result because there is nothing we can do about it.
let _ = kill_evt.write(1);
}
self.common.wait_for_epoll_threads();
}
}