agentzh,
I was wondering if you had considered having a capture mode that used a
callback rather than coroutines? In really high traffic servers, the
coroutines seem to eat a good bit of memory.
An example use could be:
Define a callback
function mycallback(res)
do_stuff_with_res
end
Then later..
ngx.location.capture("/some_other_location", mycallback)
You could also pass closures as well:
x = something_I_care_about
callback = function (res) return someothercallback(res, x) end
ngx.location.capture("/some_other_location", callback)
My Lua is a little rusty, but you get the idea.
--
Brian Akins