Hello!
On Tue, Nov 27, 2012 at 6:29 AM, Jader H. Silva wrote:
> I'm not using coroutines yet, just asked out of curiosity.
>
Your Lua code injected by content_by_lua*, rewrite_by_lua*, and
access_by_lua* is always run in a boilerplate Lua coroutine (or to be
more specific, an ngx_lua "light thread") by default.
> I've been testing set() calls to a single variable between workers, so now I
> know it can't be used as a sort of variable locking mechanism.
>
Simple cross-worker locking can be emulated via the add() primitives,
or incr/decr.
Best regards,
-agentzh