File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,13 @@ synchronize among each other very efficiently without constant polling and sleep
151
151
"Light threads" in different contexts (like in different requests) can share the same
152
152
semaphore instance as long as these "light threads" reside in the same NGINX worker
153
153
process and the [ lua_code_cache] ( https://github.com/openresty/lua-nginx-module#lua_code_cache )
154
- directive is turned on (which is the default).
154
+ directive is turned on (which is the default). For inter-process "light thread" synchronization,
155
+ it is recommended to use the [ lua-resty-lock] ( https://github.com/openresty/lua-resty-lock ) library instead
156
+ (which is a bit less efficient than this semaphore API though).
157
+
158
+ This semaphore API has a pure userland implementation which does not involve any system calls nor
159
+ block any operating system threads. It works closely with the event model of NGINX without
160
+ introducing any extra delay.
155
161
156
162
Like other APIs provided by this ` lua-resty-core ` library, the LuaJIT FFI feature is required.
157
163
You can’t perform that action at this time.
0 commit comments