mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-21 20:15:21 +00:00
af770c814b
The observation is that the code in question was used to bridge synchronized and asynchronized code. We can group the functions for that purpose under an adaptor trait. To limit the scope of locking, the users of the trait are required to implement a method to return a MutexGuard for the underlying file. This then allows us to use concrete types (QcowFile and Vhdx) in code, which is easier to read than a bunch of traits. No functional change intended. Signed-off-by: Wei Liu <liuwe@microsoft.com>