Earlier quoted context omitted.
Is this unique to Stackless Python?
Don‘t know any other runtimes that have that by default. Probably kind of possible in Erlang or so by transferring the state, but stopping and moving a green thread in the middle of execution I’ve not seen elsewhere.
You would need to be careful with the process dictionary (either don't use it, or copy it over), and you'd need a way to disseminate the new process identity and to forward messages arriving at the old process. Dealing with links and monitors would be doable. The process couldn't have Port references, so no sockets or open files or driver references; those aren't network transparent and I assume you'd be doing process migration as part of node migration so those ports would have to be closed soon anyway.
I'm having trouble coming up with a usecase that this would enable. But... at WhatsApp we did do something conceptually similar I guess when a client connected on a new connection before the old connection was detected closed. The new client2server process would message the old process and the state would be transferred ... but you would probably do that in any language.
Anyway, sounds fun!