Commit b6f205f5 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5351 quick fix of timedpush


git-svn-id: file:///svn/toku/tokudb@48729 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4cd06070
...@@ -112,7 +112,7 @@ namespace toku { ...@@ -112,7 +112,7 @@ namespace toku {
bool pushed = false; bool pushed = false;
invariant_notnull(abstime); invariant_notnull(abstime);
lock(); lock();
if (is_empty()) { if (is_full()) {
++m_push_waiters; ++m_push_waiters;
int r = toku_cond_timedwait(&m_push_cond, &m_lock, abstime); int r = toku_cond_timedwait(&m_push_cond, &m_lock, abstime);
if (r != 0) { if (r != 0) {
...@@ -120,7 +120,7 @@ namespace toku { ...@@ -120,7 +120,7 @@ namespace toku {
} }
--m_push_waiters; --m_push_waiters;
} }
if (!is_full() && m_push_waiters == 0) { if (!is_full()) {
push_and_maybe_signal_unlocked(elt); push_and_maybe_signal_unlocked(elt);
pushed = true; pushed = true;
} }
......
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