pthread patch, need test
git-svn-id: svn://db.shs.com.ru/pip@887 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
//
|
||||
// Created by fomenko on 20.09.2019.
|
||||
//
|
||||
|
||||
#ifndef PIP_TESTS_PIBLOCKINGDEQUEUE_H
|
||||
#define PIP_TESTS_PIBLOCKINGDEQUEUE_H
|
||||
|
||||
@@ -187,7 +183,7 @@ public:
|
||||
mutex.lock();
|
||||
other.mutex.lock();
|
||||
size_t count = maxCount > PIDeque<T>::size() ? PIDeque<T>::size() : maxCount;
|
||||
size_t otherRemainingCapacity = other.max_size - static_cast<PIDeque<T>>(other).size();
|
||||
size_t otherRemainingCapacity = other.max_size - static_cast<PIDeque<T> >(other).size();
|
||||
if (count > otherRemainingCapacity) count = otherRemainingCapacity;
|
||||
for (size_t i = 0; i < count; ++i) other.push_back(PIDeque<T>::take_front());
|
||||
other.mutex.unlock();
|
||||
|
||||
Reference in New Issue
Block a user