Index: trunk/Mars/mcore/Queue.h
===================================================================
--- trunk/Mars/mcore/Queue.h	(revision 17274)
+++ trunk/Mars/mcore/Queue.h	(revision 17275)
@@ -13,4 +13,6 @@
 //    splice();                // used to efficiently implement post with mutex
 
+using namespace std;
+
 template<class T, class List=std::list<T>>
 class Queue
@@ -86,5 +88,6 @@
             // successfull [allowed==0], the next event will be processed
             // immediately.
-            if (!fCallback || !fCallback(*it))
+
+            if (fCallback && fCallback(*it))
                 allowed = 0;
 
@@ -92,13 +95,10 @@
 
             // Whenever an event was successfully processed, allowed
-            // is larger than zero and thus the event will be popped
-            if (allowed==0)
+            // is equal to zero and thus the event will be popped
+            if (allowed>0)
                 continue;
 
             fList.erase(it);
-
             fSize--;
-            allowed--;
-
         }
 
