working proof-of-concept hypervisor using Parallel

This commit is contained in:
minjaesong
2024-09-13 23:22:45 +09:00
parent 8bbc752d87
commit 06ea778972
7 changed files with 69 additions and 2 deletions

View File

@@ -293,6 +293,7 @@ class Parallel(private val vm: VM) {
thread.interrupt()
vm.contexts.remove(thread)
}
fun isRunning(thread: Thread) = thread.isAlive
fun getThreadPool() = vm.contexts
}

View File

@@ -54,7 +54,7 @@ object VMRunnerFactory {
"js" -> {
object : VMRunner(extension) {
private val ringOneParallel = Parallel(vm)
private val ringTwoParallel = ParallelDummy()
private val ringTwoParallel = Parallel(vm)//ParallelDummy()
private val context = Context.newBuilder("js")
.allowHostAccess(HostAccess.ALL)