diff options
author | dormando <dormando@rydia.net> | 2011-10-03 04:24:00 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2011-10-05 00:34:18 -0700 |
commit | 90ce9e28ca71c20fafd95dcb5523f9fda526431d (patch) | |
tree | b8bc1b59e8cac3435f673613ef52409700f75f80 /thread.c | |
parent | 8af75043cfc1b3a1e997cb4311538ac744a3cc0b (diff) | |
download | memcached-90ce9e28ca71c20fafd95dcb5523f9fda526431d.tar.gz |
push cache_lock deeper into item_alloc1.4.9-beta1
easy win without restructuring item_alloc more: push the lock down after it's
done fiddling with snprintf.
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -340,9 +340,8 @@ int is_listen_thread() { */ item *item_alloc(char *key, size_t nkey, int flags, rel_time_t exptime, int nbytes) { item *it; - mutex_lock(&cache_lock); + /* do_item_alloc handles its own locks */ it = do_item_alloc(key, nkey, flags, exptime, nbytes); - pthread_mutex_unlock(&cache_lock); return it; } |