Changeset View
Changeset View
Standalone View
Standalone View
src/test/radix_tests.cpp
Show First 20 Lines • Show All 270 Lines • ▼ Show 20 Lines | for (int i = 0; i < THREADS; i++) { | ||||
rand = next(rand); | rand = next(rand); | ||||
uint32_t v(rand >> 32); | uint32_t v(rand >> 32); | ||||
if (mytree.remove(v)) { | if (mytree.remove(v)) { | ||||
success--; | success--; | ||||
std::this_thread::yield(); | std::this_thread::yield(); | ||||
} | } | ||||
std::unique_ptr<E> ptr = MakeUnique<E>(v); | std::unique_ptr<E> ptr = std::make_unique<E>(v); | ||||
if (mytree.insert(ptr.get())) { | if (mytree.insert(ptr.get())) { | ||||
success++; | success++; | ||||
std::this_thread::yield(); | std::this_thread::yield(); | ||||
} | } | ||||
if (mytree.remove(v)) { | if (mytree.remove(v)) { | ||||
success--; | success--; | ||||
RCULock::synchronize(); | RCULock::synchronize(); | ||||
Show All 31 Lines |