HashTable: Use NonNegativeCounter<> for num{...}Items 47/76047/9
authorDave Rigby <daver@couchbase.com>
Tue, 28 Mar 2017 15:35:10 +0000 (16:35 +0100)
committerDave Rigby <daver@couchbase.com>
Fri, 7 Apr 2017 11:05:04 +0000 (11:05 +0000)
commit5c4b93cc0c534617f713e0dd5c21da7ab9dbff08
tree26db7e63c2fd9cc3f7f7d2747d5ad28a633c58f2
parent232da54ea8944e944e1ca7b63d1141a65c0b65cd
HashTable: Use NonNegativeCounter<> for num{...}Items

Use cb::NonNegativeCounter<> for counts of items in the HashTable,
instead of std::atomic and manually checking for underflow.

Change-Id: I3b8182d6b443971c6d23f0e55e42a78825e147c2
Reviewed-on: http://review.couchbase.org/76047
Reviewed-by: Oliver Downard <oliver.downard@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
src/hash_table.cc
src/hash_table.h