File tree Expand file tree Collapse file tree 2 files changed +1
-22
lines changed Expand file tree Collapse file tree 2 files changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ namespace osmium {
123
123
osmium::thread::set_thread_name (" _osmium_worker" );
124
124
while (true ) {
125
125
function_wrapper task;
126
- m_work_queue.wait_and_pop_with_timeout (task);
126
+ m_work_queue.wait_and_pop (task);
127
127
if (task) {
128
128
if (task ()) {
129
129
// The called tasks returns true only when the
Original file line number Diff line number Diff line change @@ -172,27 +172,6 @@ namespace osmium {
172
172
}
173
173
}
174
174
175
- void wait_and_pop_with_timeout (T& value) {
176
- #ifdef OSMIUM_DEBUG_QUEUE_SIZE
177
- ++m_pop_counter;
178
- #endif
179
- std::unique_lock<std::mutex> lock (m_mutex);
180
- #ifdef OSMIUM_DEBUG_QUEUE_SIZE
181
- if (m_queue.empty ()) {
182
- ++m_empty_counter;
183
- }
184
- #endif
185
- if (!m_data_available.wait_for (lock, std::chrono::seconds (1 ), [this ] {
186
- return !m_queue.empty ();
187
- })) {
188
- return ;
189
- }
190
- if (!m_queue.empty ()) {
191
- value = std::move (m_queue.front ());
192
- m_queue.pop ();
193
- }
194
- }
195
-
196
175
bool try_pop (T& value) {
197
176
#ifdef OSMIUM_DEBUG_QUEUE_SIZE
198
177
++m_pop_counter;
You can’t perform that action at this time.
0 commit comments