summaryrefslogtreecommitdiff
path: root/assoc.h
diff options
context:
space:
mode:
authorTrond Norbye <Trond.Norbye@sun.com>2009-01-27 12:57:48 +0100
committerDustin Sallings <dustin@spy.net>2009-01-27 11:42:44 -0800
commit7f09e20ba53830d3df7cfad4f560819a5f9d7b90 (patch)
treeda40eecd40ea4868545e02084f2d45284dcbdfc1 /assoc.h
parent1c0285a0aa2c707283c3c07d3f729317dbe13bca (diff)
downloadmemcached-7f09e20ba53830d3df7cfad4f560819a5f9d7b90.tar.gz
Do hash expansion in it's own thread
Previously we tried to migrate one bucket over to the new hash table before we started a new command for a client, and we tried to lock the cache in order to determine if we should move an item or not. This resulted in extra contention on an already hot mutex...
Diffstat (limited to 'assoc.h')
-rw-r--r--assoc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/assoc.h b/assoc.h
index 3b32162..b8ae9c3 100644
--- a/assoc.h
+++ b/assoc.h
@@ -5,3 +5,6 @@ int assoc_insert(item *item);
void assoc_delete(const char *key, const size_t nkey);
void do_assoc_move_next_bucket(void);
uint32_t hash( const void *key, size_t length, const uint32_t initval);
+int start_assoc_maintenance_thread(void);
+void stop_assoc_maintenance_thread(void);
+