Skip to content
Snippets Groups Projects
Commit 7835f3b9 authored by Andrea Michelotti's avatar Andrea Michelotti
Browse files

Merge branch 'experimental' of...

Merge branch 'experimental' of ssh://baltig.infn.it/chaos-lnf-control/chaosframework into experimental
parents e21d11be 0e68118f
No related branches found
No related tags found
No related merge requests found
......@@ -102,6 +102,16 @@ class TLockFreeQueue {
}
return ret;
}
int clear(){
T* ele=NULL;
while(element_queue.pop(ele)){
if(ele){
delete ele;
}
size--;
}
return size;
}
int wait_and_pop(T& popped_value, int timeout_ms = 0) {
if (element_queue.empty()) {
ChaosUniqueLock lock(the_mutex);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment