dmuratshin 8 年之前
父節點
當前提交
f1064524d6
共有 2 個文件被更改,包括 9 次插入14 次删除
  1. 2 5
      oxygine/src/core/ThreadDispatcher.cpp
  2. 7 9
      oxygine/src/core/ThreadDispatcher.h

+ 2 - 5
oxygine/src/core/ThreadDispatcher.cpp

@@ -97,14 +97,13 @@ namespace oxygine
             _last.cb = 0;
         }
 
-#ifndef __S3E__
+
         if (_last.cbFunction)
         {
             LOGDN("running callback function for id=%d", _last._id);
             _last.cbFunction();
             _last.cbFunction = std::function< void() >();
         }
-#endif
     }
 
 
@@ -340,8 +339,6 @@ namespace oxygine
             }
         }
     }
-
-#ifndef __S3E__
     void ThreadDispatcher::postCallback(const std::function<void()>& f)
     {
         message ev;
@@ -363,7 +360,7 @@ namespace oxygine
 #endif
         _pushMessageWaitReply(ev);
     }
-#endif
+
 
     std::vector<ThreadDispatcher::message>& ThreadDispatcher::lockMessages()
     {

+ 7 - 9
oxygine/src/core/ThreadDispatcher.h

@@ -57,9 +57,8 @@ namespace oxygine
 
             callback    cb;
             void*       cbData;
-#ifndef __S3E__
+            
             std::function< void() >     cbFunction;
-#endif
 
             unsigned int _id;
             bool need_reply;
@@ -81,6 +80,7 @@ namespace oxygine
 
         //blocking
         void wait();
+        
         //blocking
         void get(message& ev);
 
@@ -90,24 +90,23 @@ namespace oxygine
 
         //blocking, sends message and waiting reply from other thread
         void* send(int msgid, void* arg1, void* arg2);
+        
         //blocking, sends callback and waiting until it is done
         void* sendCallback(void* arg1, void* arg2, callback cb, void* cbData, bool highPriority = false);
-#ifndef __S3E__
+
         //blocking, sends callback and waiting until it is done
         void sendCallback(const std::function<void()>&);
-#endif
-
-
 
         //async, sends post message
         void post(int msgid, void* arg1, void* arg2);
+
         //async, sends post callback
         void postCallback(int msgid, void* arg1, void* arg2, callback cb, void* cbData);
         void postCallback(void* arg1, void* arg2, callback cb, void* cbData);
-#ifndef __S3E__
+
         //async, sends post callback
         void postCallback(const std::function<void()>&);
-#endif
+
         //remove scheduled postCallback
         void removeCallback(int msgid, callback cb, void* cbData);
 
@@ -128,7 +127,6 @@ namespace oxygine
         void _pushMessage(message&);
         void _pushMessageWaitReply(message&, bool highPriority = false);
         void _popMessage(message&);
-        void _popMessageNoCB(message&);
         void _replyLast(void* val);