mirror of https://github.com/PentHertz/srsLTE.git
fix block_queue pop and clear methods
- pop was bzero'ing the popped object which causes for more complex objects like std::string - clear wasn't actually emptying the queue
This commit is contained in:
parent
c56fa3b46c
commit
bd6bb6903f
|
@ -109,7 +109,6 @@ public:
|
|||
|
||||
myobj wait_pop() { // blocking pop
|
||||
myobj value;
|
||||
bzero(&value, sizeof(myobj));
|
||||
pop_(&value, true);
|
||||
return value;
|
||||
}
|
||||
|
@ -154,8 +153,8 @@ private:
|
|||
}
|
||||
if (value) {
|
||||
*value = q.front();
|
||||
q.pop();
|
||||
}
|
||||
q.pop();
|
||||
ret = true;
|
||||
if (mutexed_callback) {
|
||||
mutexed_callback->popping(*value);
|
||||
|
|
Loading…
Reference in New Issue