[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: So, what the heck is a continuation anyway?




  > X-Sender: dan@pop.sidhe.org
  > Date: Mon, 10 Dec 2001 15:37:11 -0500
  > From: Dan Sugalski <dan@sidhe.org>
  > Cc: "Seth Gordon" <sethg@ropine.com>, ll1-discuss@ai.mit.edu
  > Content-Type: text/plain; charset="us-ascii"; format=flowed
  > Sender: owner-ll1-discuss@ai.mit.edu
  > Precedence: bulk
  > 
  > At 10:11 AM 12/10/2001 -0500, Jeremy Hylton wrote:
  > > >>>>> "DS" == Dan Sugalski <dan@sidhe.org> writes:
  > >
  > >   DS> can I get a continuation object/marker from within A and pass it
  > >   DS> to B, which then triggers it and returns to A even though I've
  > >   DS> unwound the stack frames for A?
  > >
  > >Sure.
  > >
  > >You can invoke the continuation and return through A an arbitrary
  > >number of times.
  > 
  > Hmmm. That means I need to snapshot the stack frames and the scratchpads. 
  > Doable.

Careful, you don't want to crash as often as Stackless Python. 

Unless you heap allocate all values, copying the stack naively 
will be a problem. 

-- Matthias