diff --git a/qemu-components/qmp/include/qmp.h b/qemu-components/qmp/include/qmp.h index de69c115..61db79b8 100644 --- a/qemu-components/qmp/include/qmp.h +++ b/qemu-components/qmp/include/qmp.h @@ -143,6 +143,13 @@ class qmp : public sc_core::sc_module } } } + + ~qmp() + { + if (reader_thread.joinable()) { + reader_thread.join(); + } + } }; extern "C" void module_register();