mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Take the recent thread refactor further. Bundle a device's worker JoinHandles together with the kill event that stops them into a single WorkerThreads value, owned by VirtioCommon. Its Drop signals the workers to exit, unparks any parked for migration, and joins them. This makes a detached/leaked worker unrepresentable. reset(), wait_for_epoll_threads() and VhostUserCommon::shutdown() now happen when dropping the WorkerThreads, and the unpark-before-join teardown now lives in one place. Assisted-by: Claude:Opus-4.8 Signed-off-by: Dylan Reid <dgreid@fb.com> Signed-off-by: Rob Bradford <rbradford@meta.com>