[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: about coroutines
From: |
Michele Bini |
Subject: |
Re: about coroutines |
Date: |
Fri, 23 Nov 2001 01:38:13 +0100 |
>>>>> "Marius" == Marius Vollmer <address@hidden> writes:
Marius> Michele Bini <address@hidden> writes:
>> I think that there is a problem with storing continuations for
>> coroutines in lexically scoped (non-global) variables or passing
>> them as arguments or as return values, since when you create a
>> continuation to save the current execution point for a coroutine
>> there is the risk that a reference to the continuation for a
>> previous execution point still exists (in the stack); when this
>> happens a chain of unfreeable continuations will accumulate over
>> time.
Marius> Do you think this is a bug on Guile's part, or is it
Marius> unavoidable? I plan to find the precise location where the
Marius> continuation references stick...
Well, i don't think this can be regarded as a bug, probably more of a
weakness intrinsic in C scheme implementations using conservative
garbage collection and stack-copying based continuations.
Scheme programmers should be perhaps suggested to clearly encapsulate
continuations references in other scheme objects, when using them for
anything more complex than non-local exits, to avoid polluting the
stack with spurious references.
Michele
- about coroutines, Michele Bini, 2001/11/17
- Re: about coroutines, Keith Wright, 2001/11/18
- Re: about coroutines, Michele Bini, 2001/11/18
- Re: about coroutines, Keith Wright, 2001/11/18
- Re: about coroutines, Marius Vollmer, 2001/11/19
- Re: about coroutines, Keith Wright, 2001/11/19
- Re: about coroutines, Michele Bini, 2001/11/19
- Re: about coroutines, Marius Vollmer, 2001/11/21
- Re: about coroutines,
Michele Bini <=
- Re: about coroutines, Marius Vollmer, 2001/11/29
- Re: about coroutines, mibin, 2001/11/30