ok fiiiiine i'll do it the non hacky way

This commit is contained in:
modeco80
2024-11-02 07:54:26 -04:00
parent 86f1345a2d
commit 9fbdb84822

View File

@@ -31,6 +31,12 @@ export class QemuVMShim implements VM {
} else {
this.vm = new QemuVM(def);
}
this.vm.on('statechange', async (newState) => {
if(newState == VMState.Started) {
await this.PlaceVCPUThreadsIntoCGroup();
}
});
}
Start(): Promise<void> {
@@ -70,10 +76,6 @@ export class QemuVMShim implements VM {
}
StartDisplay(): void {
// HACK: We should probably use another subscribed eventemitter for this. For now,
// this "works". I guess.
this.PlaceVCPUThreadsIntoCGroup();
// boot it up
let info = this.vm.GetDisplayInfo();