lua-resty-lock icon indicating copy to clipboard operation
lua-resty-lock copied to clipboard

Simple nonblocking lock API for ngx_lua based on shared memory dictionaries

Results 8 lua-resty-lock issues
Sort by recently updated
recently updated
newest added

When using lua-resty-lock to create and dispose large amount of locks will cause the internal `memo` table behave incorrectly. We injected some debugging code in `lock.lua` and output the "leaked"...

hi, @agentzh ~ recently. Some of my ut tests reported the errors below `cannot convert 'table' to 'int' ` in lock.lua:139 by accidentally. Whta's the probable reason could cause this?...

For example, I use a worker-based cache. I get the data from redis and save it to the worker-level cache. I don't need a lock.For example, I get data from...

hi,agentzh I used lock:lock on init_worker_by_lua_file,but inoperative. here is my code `local resty_lock = require "resty.lock" local lockOpts = {["exptime"]="5",["timeout"]="0"} local lock, err = resty_lock:new("MY_LOCKS",lockOpts) if not lock then ngx.log(ngx.ERR,"failed...

It'd be great if this library provided semaphores as well as mutexes. My use-case is implementing simple request queueing / concurrency limiting in the access phase by waiting on a...

Currently it's only possible to set an expiration time to the entire dictionary when creating a new instance: ``` lua local obj = resty_lock:new("locks_dict", {exptime = 10}) ``` It would...

never overrides the (least recently used) unexpired items in the store when running out of storage in the shared memory zone