当 Mono 运行时被集成为 Second Life 脚本引擎时,暂停正在运行的进程,然后序列化并移动到另一台机器(或稍后)并恢复的能力是在 Mono 运行时上实现的。这是几年前的事了,我不确定这项工作是否被重新合并到开源 Mono 代码中。但据所有报道,这是一次成功的演习。
来自 Miguel 的这篇博客文章可能是一个好的开始http://tirania.org/blog/archive/2008/Jan-29.html并且有更多指向 LANG.NET 视频的链接,其中讨论了 Mono 工作的第二人生。
关于另一篇文章到底做了什么的更多线索:
2006 年,LindenLabs 的 Jim 介绍了他们在 SecondLife 中为支持微线程所做的工作。
Jim's work was a lot more ambitious than what both Joe had requested. SecondLife required that code be suspended at any point in time and that its entire state be serializable into a format suitable for storage into a database. Serialized state could then be restored at a different point in time or on a different computer (for example while moving from node to node).
For this to work, they needed a system that would track precisely the entire call stack chain, local variables and parameters as well as being able to suspend the code at any point.
Jim did this by using a CIL rewriting engine that injected the state serialization and reincarnation into an existing CIL instructions stream. He covered the technology in detail in his Lang.NET talk in 2006.
The technology went in production in 2008 and today this continuation framework powers 10 million Mono scripts on SecondLife.