projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8035fc1
)
folly/MPMCQueue sizeGuess should return a signed int
author
Nathan Bronson
<ngbronson@fb.com>
Fri, 19 Jul 2013 18:12:59 +0000
(11:12 -0700)
committer
Sara Golemon
<sgolemon@fb.com>
Wed, 28 Aug 2013 21:30:10 +0000
(14:30 -0700)
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
folly/MPMCQueue.h
patch
|
blob
|
history
diff --git
a/folly/MPMCQueue.h
b/folly/MPMCQueue.h
index 9fb7867fdbe32c50a4931685eb37ffa713164aeb..58c1d3cef08f3af9e5af1126f2bb6001c226bd4e 100644
(file)
--- 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();
}