Modules TSC: Add mutex for server.lruclock.

Only useful for when no atomic builtins are available.
This commit is contained in:
antirez
2017-05-09 16:32:49 +02:00
parent ece658713b
commit 9390c384b8
2 changed files with 2 additions and 0 deletions

View File

@ -1432,6 +1432,7 @@ void initServerConfig(void) {
server.lua_time_limit = LUA_SCRIPT_TIME_LIMIT;
unsigned int lruclock = getLRUClock();
pthread_mutex_init(&server.lruclock_mutex,NULL);
atomicSet(server.lruclock,lruclock);
resetServerSaveParams();