void run() { OldThreadPool tp(nThreads); for (unsigned i = 0; i < iterations; i++) { tp.schedule(&ThreadPoolTest::increment, this, 2); } tp.join(); ASSERT_EQUALS(counter.load(), iterations * 2); }
void* DurableImpl::writingPtr(void *x, unsigned len) { dassert(shutdownRequested.load() == 0); void *p = x; declareWriteIntent(p, len); return p; }
void* NonDurableImpl::writingPtr(void *x, unsigned len) { dassert(shutdownRequested.load() == 0); return x; }