|
|
|
|
|
by aardvark179
1909 days ago
|
|
Many virtual threads won’t have large stacks, and many others will not substantially grow or shrink their stacks between yields. You only need to copy stack frames from the heap as they are needed (so as the stack unwinds) and you only need to copy new stack frames to the heap when a thread yields. With a few other clever tricks this can really reduce the data that has to be copied. We can do these tricks because we know lots of properties of the Java stack, and they give a different set of trade offs to Go’s approach. |
|