[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: So, what the heck is a continuation anyway?
>>>>> "MF" == Matthias Felleisen <firstname.lastname@example.org> writes:
[Diplomatic as always :-)]
MF> Careful, you don't want to crash as often as Stackless Python.
MF> Unless you heap allocate all values, copying the stack naively
MF> will be a problem.
Does Stackless Python crash often? And because of stack allocated
values? I haven't used it much, but know of some uses in commercial
settings that wouldn't seem to tolerate frequent crashes. Nor was I
aware that it did anything like copying the C stack.
Regular Python heap allocates all of its objects, including stack
frames. The problems posed by the implementation of standard Python
are (1) that it makes a C function call for each Python function call
anyway and (2) that frames don't store enough information to be
resumed multiple times. The solution, as I understood it, was to
eliminate the C call for each Python call and make sure all the right
information was stored in Python frames.