是因为文档没有更新吗?在Openresty-1.4.2.8中不能用,在1.4.3.9可以了。
syntax: co = coroutine.create(f)
context: rewrite_by_lua, access_by_lua*, content_by_lua*, ngx.timer.**
Hello! 2013/12/30 Ruoshan Huang: > 是因为文档没有更新吗?在Openresty-1.4.2.8中不能用,在1.4.3.9可以了。 > syntax: co = coroutine.create(f) > context: rewrite_by_lua, access_by_lua*, content_by_lua*, ngx.timer.** > coroutine API 最早是在 ngx_lua 0.9.2 中可以用于 init_by_lua* 上下文中的。对应 ngx_openresty 主线版 1.4.3.3. 所以你使用的 1.4.3.9 自然也是可以的。 我刚刚更新了一下文档: https://github.com/chaoslawful/lua-nginx-module#coroutinecreate 多谢提醒! Best regards, -agentzh