# HG changeset patch # User Ziv Scully # Date 1448038274 18000 # Node ID 42079884e34a5bc5fb51491aec6688aa120cbc4d # Parent ace43b90b38821733930dff163ff06d75eac17dc Add read locks around time read in store. diff -r ace43b90b388 -r 42079884e34a src/c/urweb.c --- a/src/c/urweb.c Fri Nov 20 10:51:43 2015 -0500 +++ b/src/c/urweb.c Fri Nov 20 11:51:14 2015 -0500 @@ -4815,7 +4815,9 @@ update->value = value; update->next = NULL; // Can't use [uw_Sqlcache_getTimeNow] because it modifies state and we don't have the lock. + pthread_rwlock_rdlock(&cache->lockIn); value->timeValid = cache->timeNow; + pthread_rwlock_unlock(&cache->lockIn); if (ctx->cacheUpdateTail) { ctx->cacheUpdateTail->next = update; } else {