1 Star 0 Fork 0

kuoyihp/nginx-lua-module-zh-wiki

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
coroutinewrap.md 1.10 KB
一键复制 编辑 原始数据 按行查看 历史

coroutine.wrap

语法: co = coroutine.wrap(f)

环境: rewrite_by_lua, access_by_lua*, content_by_lua*, init_by_lua*, ngx.timer., header_filter_by_lua, body_filter_by_lua**

类似标准的 Lua coroutine.wrap API,但它是在 ngx_lua 创建的 Lua 协程环境中运行。

该 API 在 init_by_lua* 的环境中可用,是从 0.9.2 开始的。

该 API 在 v0.6.0 版本首次引入。

返回目录

English source:

coroutine.wrap

syntax: co = coroutine.wrap(f)

context: rewrite_by_lua, access_by_lua*, content_by_lua*, init_by_lua*, ngx.timer., header_filter_by_lua, body_filter_by_lua**

Similar to the standard Lua coroutine.wrap API, but works in the context of the Lua coroutines created by ngx_lua.

This API was first usable in the context of init_by_lua* since the 0.9.2.

This API was first introduced in the v0.6.0 release.

Back to TOC

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qizhendong_admin/nginx-lua-module-zh-wiki.git
git@gitee.com:qizhendong_admin/nginx-lua-module-zh-wiki.git
qizhendong_admin
nginx-lua-module-zh-wiki
nginx-lua-module-zh-wiki
master

搜索帮助