Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 1.21 KB

coroutineyield.md

File metadata and controls

33 lines (19 loc) · 1.21 KB

coroutine.yield

语法: ... = coroutine.yield(...)

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

挂起当前用户 Lua 协程的执行。

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

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

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

返回目录

English source:

coroutine.yield

syntax: ... = coroutine.yield(...)

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

Yields the executation of the current user Lua coroutine.

Similar to the standard Lua coroutine.yield 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