[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Coroutines and protected calls
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 24 Oct 2002 14:09:35 -0200
> Is there some policy that must be adhered to when mixing coroutines with
> the trowing and catching of errors?
Yes. You cannot yield "across" a C call. ("across" means there is an
active C function in the stack below who called yield.) That implies
you cannot yield inside pcall, string.gsub, table.sort, etc.