红联Linux门户
Linux帮助

工具包 Javaflow

发布时间:2012-11-06 15:48:57来源:红联作者:empast
Sometimes it is usefull if we can capture the state of the application, its stack of function calls, which includes local variables, the global variables and the program counter, and save them into an object. If this object would give us the ability to restart the processing from the point stored in it.

A continuation is exactly the type of object that we need. Think of a continuation as an object that, for a given point in your program, contains a snapshot of the stack trace, including all the local variables, and the program counter. You can not only store these things in the continuation object, but also restore the execution of the program from a continuation object. This means that the stack trace and the program counter of the running program become the ones stored in a continuation.

Continuations are powerful concepts from the world of functional languages, like Scheme, but they are becoming popular in other languages as well.

主页:http://commons.apache.org/sandbox/javaflow/

下载:http://commons.apache.org/sandbox/javaflow/downloads.html

来自:开源中国社区
文章评论

共有 0 条评论