From: Nathan Bronson Date: Fri, 19 Jul 2013 18:12:59 +0000 (-0700) Subject: folly/MPMCQueue sizeGuess should return a signed int X-Git-Tag: v0.22.0~922 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ff1046b8a239d5f7e58e2756f6b7eb8ec830ff61;p=folly.git folly/MPMCQueue sizeGuess should return a signed int Summary: Like size(), sizeGuess() is allowed to return a negative value, so it should be ssize_t instead of uint64_t. Test Plan: fbmake, wait for contbuild Reviewed By: tudorb@fb.com FB internal diff: D893075 --- diff --git a/folly/MPMCQueue.h b/folly/MPMCQueue.h index 9fb7867f..58c1d3ce 100644 --- a/folly/MPMCQueue.h +++ b/folly/MPMCQueue.h @@ -196,7 +196,7 @@ class MPMCQueue : boost::noncopyable { /// Returns is a guess at size() for contexts that don't need a precise /// value, such as stats. - uint64_t sizeGuess() const noexcept { + ssize_t sizeGuess() const noexcept { return writeCount() - readCount(); }