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

refs #5351 fix a test deadlock

git-svn-id: file:///svn/toku/tokudb@48720 c7de825b-a66e-492c-adef-691d508d4ae1
parent 32163e33
......@@ -23,11 +23,13 @@ public:
void push(const T &);
__attribute__((warn_unused_result))
bool trypush(const T &);
__attribute__((warn_unused_result))
T pop(void);
__attribute__((nonnull))
__attribute__((nonnull, warn_unused_result))
bool trypop(T * const);
private:
......
......@@ -88,6 +88,10 @@ static void test_with_threads(void) {
swapped = __sync_bool_compare_and_swap(&producers_joined, false, true);
invariant(swapped);
// kick it in case it's still waiting
bool pushed = buf.trypush(1);
(void) pushed; // yes, really ignore it
r = toku_pthread_join(consumer_thd, nullptr);
invariant_zero(r);
......
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