Commit a55b70cc authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

fix a data race found with helgrind. closes #1370

git-svn-id: file:///svn/toku/tokudb.1032b+1343@8622 c7de825b-a66e-492c-adef-691d508d4ae1
parent ef40f5e2
......@@ -114,7 +114,9 @@ test_set_closed_thread (void) {
toku_pthread_t tid;
r = toku_pthread_create(&tid, 0, test_set_closed_waiter, wqm); assert(r == 0);
sleep(1);
r = toku_pthread_mutex_lock(&wqm->mutex); assert(r == 0);
writequeue_set_closed(&wqm->writequeue);
r = toku_pthread_mutex_unlock(&wqm->mutex); assert(r == 0);
void *ret;
r = toku_pthread_join(tid, &ret);
assert(r == 0 && ret == wqm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment