projects
/
invirt/third/libt4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanups
[invirt/third/libt4.git]
/
rpc
/
fifo.h
diff --git
a/rpc/fifo.h
b/rpc/fifo.h
index
93a79cf
..
dde514d
100644
(file)
--- a/
rpc/fifo.h
+++ b/
rpc/fifo.h
@@
-8,20
+8,20
@@
template<class T>
class fifo {
public:
template<class T>
class fifo {
public:
- fifo(int limit=0) : max_(limit) {};
+ fifo(size_t limit=0) : max_(limit) {}
bool enq(T, bool blocking=true);
void deq(T *);
bool size() {
lock ml(m_);
return q_.size();
bool enq(T, bool blocking=true);
void deq(T *);
bool size() {
lock ml(m_);
return q_.size();
- };
+ }
private:
std::list<T> q_;
mutex m_;
cond non_empty_c_; // q went non-empty
cond has_space_c_; // q is not longer overfull
private:
std::list<T> q_;
mutex m_;
cond non_empty_c_; // q went non-empty
cond has_space_c_; // q is not longer overfull
- unsigned int max_; // maximum capacity of the queue, block enq threads if exceeds this limit
+ size_t max_; // maximum capacity of the queue, block enq threads if exceeds this limit
};
template<class T> bool
};
template<class T> bool