Skip to content

Commit a03335a

Browse files
Costa ShulyupinCosta Shulyupin
Costa Shulyupin
authored and
Costa Shulyupin
committed
rename deprecated methods to push_back and pull_front
1 parent 23e7658 commit a03335a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

test/sync/mutual_exclusion/sync_bounded_queue/multi_thread_pass.cpp

+13-13
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// class sync_queue<T>
99

10-
// push || pull;
10+
// push_back || pull_front;
1111

1212
#include <boost/config.hpp>
1313
#if ! defined BOOST_NO_CXX11_DECLTYPE
@@ -35,7 +35,7 @@ struct call_push
3535
void operator()()
3636
{
3737
go_.count_down_and_wait();
38-
q_.push(42);
38+
q_.push_back(42);
3939

4040
}
4141
};
@@ -54,7 +54,7 @@ struct call_push_2
5454
void operator()()
5555
{
5656
go_.count_down_and_wait();
57-
q_.push(42);
57+
q_.push_back(42);
5858
end_.count_down_and_wait();
5959

6060
}
@@ -73,7 +73,7 @@ struct call_pull
7373
int operator()()
7474
{
7575
go_.count_down_and_wait();
76-
return q_.pull();
76+
return q_.pull_front();
7777
}
7878
};
7979

@@ -93,7 +93,7 @@ void test_concurrent_push_and_pull_on_empty_queue()
9393
[&q,&go]()
9494
{
9595
go.wait();
96-
q.push(42);
96+
q.push_back(42);
9797
}
9898
#else
9999
call_push(q,go)
@@ -104,7 +104,7 @@ void test_concurrent_push_and_pull_on_empty_queue()
104104
[&q,&go]() -> int
105105
{
106106
go.wait();
107-
return q.pull();
107+
return q.pull_front();
108108
}
109109
#else
110110
call_pull(q,go)
@@ -136,7 +136,7 @@ void test_concurrent_push_on_empty_queue()
136136
[&q,&go]()
137137
{
138138
go.wait();
139-
q.push(42);
139+
q.push_back(42);
140140
}
141141
#else
142142
call_push(q,go)
@@ -148,7 +148,7 @@ void test_concurrent_push_on_empty_queue()
148148

149149
BOOST_TEST(!q.empty());
150150
for (unsigned int i =0; i< n; ++i)
151-
BOOST_TEST_EQ(q.pull(), 42);
151+
BOOST_TEST_EQ(q.pull_front(), 42);
152152
BOOST_TEST(q.empty());
153153

154154
}
@@ -175,7 +175,7 @@ void test_concurrent_push_on_full_queue()
175175
[&q,&go,&end]()
176176
{
177177
go.wait();
178-
q.push(42);
178+
q.push_back(42);
179179
end.wait();
180180
}
181181
#else
@@ -187,15 +187,15 @@ void test_concurrent_push_on_full_queue()
187187
BOOST_TEST(!q.empty());
188188
BOOST_TEST(q.full());
189189
for (unsigned int i =0; i< size; ++i)
190-
BOOST_TEST_EQ(q.pull(), 42);
190+
BOOST_TEST_EQ(q.pull_front(), 42);
191191
end.wait();
192192

193193
for (unsigned int i = 0; i < n; ++i)
194194
push_done[i].get();
195195

196196
BOOST_TEST(!q.empty());
197197
for (unsigned int i =0; i< size; ++i)
198-
BOOST_TEST_EQ(q.pull(), 42);
198+
BOOST_TEST_EQ(q.pull_front(), 42);
199199
BOOST_TEST(q.empty());
200200

201201
}
@@ -215,15 +215,15 @@ void test_concurrent_pull_on_queue()
215215
try
216216
{
217217
for (unsigned int i =0; i< n; ++i)
218-
q.push(42);
218+
q.push_back(42);
219219

220220
for (unsigned int i =0; i< n; ++i)
221221
pull_done[i]=boost::async(boost::launch::async,
222222
#if ! defined BOOST_NO_CXX11_LAMBDAS
223223
[&q,&go]() -> int
224224
{
225225
go.wait();
226-
return q.pull();
226+
return q.pull_front();
227227
}
228228
#else
229229
call_pull(q,go)

0 commit comments

Comments
 (0)