Home
last modified time | relevance | path

Searched refs:circular_buf (Results 1 – 2 of 2) sorted by relevance

/third_party/boost/libs/thread/tutorial/
Dbounded_buffer.cpp17 bounded_buffer(int n) : begin(0), end(0), buffered(0), circular_buf(n) { } in bounded_buffer()
20 while (buffered == circular_buf.size()) in send()
22 circular_buf[end] = m; in send()
23 end = (end+1) % circular_buf.size(); in send()
31 int i = circular_buf[begin]; in receive()
32 begin = (begin+1) % circular_buf.size(); in receive()
39 std::vector<int> circular_buf; member in bounded_buffer
/third_party/boost/libs/thread/example/
Dcondition.cpp19 bounded_buffer(int n) : boost::noncopyable(), begin(0), end(0), buffered(0), circular_buf(n) { } in bounded_buffer()
23 while (buffered == circular_buf.size()) in send()
25 circular_buf[end] = m; in send()
26 end = (end+1) % circular_buf.size(); in send()
34 int i = circular_buf[begin]; in receive()
35 begin = (begin+1) % circular_buf.size(); in receive()
44 std::vector<int> circular_buf; member in bounded_buffer