@@ -2762,14 +2762,14 @@ Nginx API for Lua
27622762* [ ngx.worker.pid] ( #ngxworkerpid )
27632763* [ ngx.worker.count] ( #ngxworkercount )
27642764* [ ngx.worker.id] ( #ngxworkerid )
2765+ * [ ngx.semaphore] ( #ngxsemaphore )
27652766* [ ndk.set_var.DIRECTIVE] ( #ndkset_vardirective )
27662767* [ coroutine.create] ( #coroutinecreate )
27672768* [ coroutine.resume] ( #coroutineresume )
27682769* [ coroutine.yield] ( #coroutineyield )
27692770* [ coroutine.wrap] ( #coroutinewrap )
27702771* [ coroutine.running] ( #coroutinerunning )
27712772* [ coroutine.status] ( #coroutinestatus )
2772- * [ ngx.semaphore] ( #ngxsemaphore )
27732773
27742774
27752775[ Back to TOC] ( #table-of-contents )
@@ -7190,6 +7190,27 @@ This API was first introduced in the `0.9.20` release.
71907190
71917191[ Back to TOC] ( #nginx-api-for-lua )
71927192
7193+ ngx.semaphore
7194+ -------------
7195+ ** syntax:** * local semaphore = require "ngx.semaphore"*
7196+
7197+ This is a Lua module that implements a classic-style semaphore API for efficient synchronizations among
7198+ different "light threads". Sharing the same semaphore among different "light threads" created in different (request)
7199+ contexts are also supported as long as the "light threads" reside in the same NGINX worker process
7200+ and the [ lua_code_cache] ( #lua_code_cache ) directive is turned on (which is the default).
7201+
7202+ This Lua module does not ship with this ngx_lua module itself rather it is shipped with
7203+ the
7204+ [ lua-resty-core] ( https://github.com/openresty/lua-resty-core ) library.
7205+
7206+ Please refer to the [ documentation] ( https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/semaphore.md )
7207+ for this ` ngx.semaphore ` Lua module in [ lua-resty-core] ( https://github.com/openresty/lua-resty-core )
7208+ for more details.
7209+
7210+ This feature requires at least ngx_lua ` v0.9.21 ` .
7211+
7212+ [ Back to TOC] ( #nginx-api-for-lua )
7213+
71937214ndk.set_var.DIRECTIVE
71947215---------------------
71957216** syntax:** * res = ndk.set_var.DIRECTIVE_NAME*
@@ -7321,27 +7342,6 @@ This API was first enabled in the `v0.6.0` release.
73217342
73227343[ Back to TOC] ( #nginx-api-for-lua )
73237344
7324- ngx.semaphore
7325- -------------
7326- ** syntax:** * local semaphore = require "ngx.semaphore"*
7327-
7328- This is a Lua module that implements a classic-style semaphore API for efficient synchronizations among
7329- different "light threads". Sharing the same semaphore among different "light threads" created in different (request)
7330- contexts are also supported as long as the "light threads" reside in the same NGINX worker process
7331- and the [ lua_code_cache] ( #lua_code_cache ) directive is turned on (which is the default).
7332-
7333- This Lua module does not ship with this ngx_lua module itself rather it is shipped with
7334- the
7335- [ lua-resty-core] ( https://github.com/openresty/lua-resty-core ) library.
7336-
7337- Please refer to the [ documentation] ( https://github.com/cuiweixie/lua-resty-core/blob/semaphore/lib/ngx/semaphore.md )
7338- for this ` ngx.semaphore ` Lua module in [ lua-resty-core] ( https://github.com/openresty/lua-resty-core )
7339- for more details.
7340-
7341- This feature requires at least ngx_lua ` v0.9.21 ` .
7342-
7343- [ Back to TOC] ( #nginx-api-for-lua )
7344-
73457345Obsolete Sections
73467346=================
73477347
0 commit comments