Re: coop - a concurrent ml-like wanna be (pre-SRFI)
Amirouche 06 May 2021 16:48 UTC
On 2021-05-06 18:37, Marc Nieper-Wißkirchen wrote:
> I haven't checked your code yet, but let me explain the space problem:
> call/cc saves the whole continuation, i.e. the whole stack of call
> frames. Now if you capture a continuation, which you don't mean to run
> fully but always mean to abort in the middle, you will keep too many
> frames in memory. Depending on what values are in the local frames,
> this may or may not waste a lot of memory.
>
> Does it make sense to you?
>
Yes, it may use a lot of memory, the memory will be reclaimed
when the captured continuation goes out-of-scope.
There is two continuation one of which is delimited.