add support for absl::Mutex

This commit is contained in:
greg
2019-04-13 20:22:13 -04:00
parent 9f5a7a37f0
commit bbc746d34a
3 changed files with 164 additions and 64 deletions
+5 -1
View File
@@ -13,6 +13,10 @@
#if 1
#include <mutex>
#define MTX std::mutex
#elif 0
// Abseil's mutexes are very efficient (at least on windows)
#include "absl/synchronization/mutex.h"
#define MTX absl::Mutex
#elif 0
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
@@ -415,7 +419,7 @@ int main(int argc, char ** argv)
#endif
else if(!strcmp(argv[2], "random"))
{
fprintf(stderr, "size = %llu\n", sizeof(hash));
fprintf(stderr, "size = %zu\n", sizeof(hash));
timer = _fill_random2(num_keys, hash);
//out("random", num_keys, timer);
//fprintf(stderr, "inserted %llu\n", hash.size());