This library did not share anything so yes. But i do not think you can use this library from several threads.
– moteusAug 30 '16 at 17:22
Vanilla Lua doesn't support threads, so "everything" is thread-safe. Most `mod_$LANGUAGE` Apache plugins, as far as I can tell, run separate processes for each request, so there's nothing to share anyway.
– Colonel Thirty TwoAug 30 '16 at 19:55
1
If modulewritten on C and use e.g. static variables then it may not be thread safe. But pure lua modules which do mot use any not thread safe libs are thread safe
– moteusAug 30 '16 at 20:17
@moteus Is there then any lru cache implementation that would work with mod_lua?
– callowAug 31 '16 at 06:19
An alternative could be using mod_lua's inter vm cache instead of the map, to store the k-v pairs, and the size and the pointers, but then updating them in multi-thread would not be safe. Wondering if there's an alternative.
– callowSep 13 '16 at 06:03