3 ms·
> I haven't been able to figure out how the "unmount" of a virtual thread works. The native stack is just memory like any other, pointed to by the stack pointe
by chrisseaton 4y ago
> I haven't been able to figure out how the "unmount" of a virtual thread works.
The native stack is just memory like any other, pointed to by the stack pointer. You can unmount one stack and mount another by changing the stack pointer. You can also do it by copying the stack out to a backing store, and copying the new thread's stack back in. I think the JVM does the latter, but not an expert.