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
master
Andre Puschmann 6 years ago
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…
Cancel
Save