[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.2: environment table and coroutine
- From: Mark Hamburg <mark@...>
- Date: Sat, 3 Apr 2010 09:05:57 -0700
On Apr 3, 2010, at 5:41 AM, Roberto Ierusalimschy wrote:
>> I guess my questions is :
>> Does the time it take to construct a coroutine state (in C) far
>> exceed the time that it would take to re-initialize (the stack) of
>> an existing coroutine that has thrown an error?
>
> Probably yes. But you should also ask another question: how frequently
> will you need to construct a new coroutine instead of reusing one? If
> it only happens in case of errors, maybe the first question is not that
> relevant.
Lightroom recycles coroutines but only if they don't terminate in an error.
Mark