Efficient resumption of co-routines on a linear stack
Abstract
Unsuspended co-routines are handled by the machine call stack mechanism in which the stack grows and shrinks as recursive calls are made and returned from. When a co-routine is suspended, however, additional call stack processing is performed. A suspension message is issued, and the entire resume-able part of the call stack is removed, and is copied to the heap. A frame that returns control to a driver method (a resumer) is copied to the call stack so that resumption of the co-routine does not recursively reactivate the whole call stack. Instead the resumer reactivates only the topmost or most current frame called the leaf frame. When a co-routine is suspended, it does not return to its caller, but instead returns to the resumer that has reactivated it.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 44 · Forward citations: 0.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A system comprising: a processor and a memory including a module configured to cause the processor to: suspend and resume co-routines comprising a calling co-routine and a called co-routine in a computer environment utilizing a single linear machine call stack not inherently capable of suspending and resuming co-routines, wherein only in response to detecting suspension of the called co-routine, the module: saves a resume-able portion of the single linear machine call stack not previously saved to a heap that emulates the single linear machine call stack but is separate from the single linear
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (44)
Non-Patent Literature (5)
- "Lazy evaluation," Wikipedia, 4 pages, Retrieved Mar. 24, 2009, from .
- "Lazy evaluation," Wikipedia, 4 pages, Retrieved Mar. 24, 2009, from <http://en.wikipedia.org/wiki/Lazy—evaluation>.
- "Standard streams," Wikipedia, 5 pages, Retrieved Mar. 24, 2009, from .
- "Standard streams," Wikipedia, 5 pages, Retrieved Mar. 24, 2009, from <http://en.wikipedia.org/wiki/Standard—streams>.
- "Stream (computing)0," Wikipedia, 1 page, Retrieved Mar. 24, 2009, from .