]> git.sesse.net Git - casparcg/commitdiff
(no commit message)
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sat, 5 Nov 2011 14:45:05 +0000 (14:45 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sat, 5 Nov 2011 14:45:05 +0000 (14:45 +0000)
concrt_extras/agents_extras.h

index f49b45a1ed060995161e10af4b0bba1741b8a23f..74f7c44ea0654087048e46c8273f819e924f1bf0 100644 (file)
@@ -1181,11 +1181,11 @@ namespace Concurrency
         /// <param name="_PMessage">\r
         ///     A pointer to a new message.\r
         /// </param>\r
-        virtual void propagate_to_any_targets(message<_Type> * _PMessage)\r
+               virtual void propagate_to_any_targets(message<_Type> * _PMessage)\r
         {\r
             // Enqueue pMessage to the internal message buffer if it is non-NULL.\r
             // pMessage can be NULL if this LWT was the result of a Repropagate call\r
-            // out of a Consume or Release (where no new message is queued up, but\r
+           // out of a Consume or Release (where no new message is queued up, but\r
             // everything remaining in the bounded buffer needs to be propagated out)\r
             if (_PMessage != NULL)\r
             {\r
@@ -1194,13 +1194,16 @@ namespace Concurrency
                 // If the incoming pMessage is not the head message, we can safely assume that\r
                 // the head message is blocked and waiting on Consume(), Release() or a new\r
                 // link_target() and cannot be propagated out.\r
-                if (_M_messageBuffer.is_head(_PMessage->msg_id()))\r
+                if (!_M_messageBuffer.is_head(_PMessage->msg_id()))\r
                 {\r
-                    _Propagate_priority_order();\r
+                    return;\r
                 }\r
             }\r
-            else\r
+\r
+            _Propagate_priority_order();\r
+            \r
             {\r
+\r
                 // While current size is less than capacity try to consume\r
                 // any previously offered ids.\r
                 bool _ConsumedMsg = true;\r