2 #include "oxygine-include.h" 6 #if defined(_WIN32) && !defined(__MINGW32__) 7 typedef struct pthread_mutex_t_* pthread_mutex_t;
8 typedef struct pthread_cond_t_* pthread_cond_t;
22 pthread_mutex_t& _mutex;
49 typedef void (*callback)(
const message& m);
52 message(): msgid(0), arg1(0), arg2(0), cb(0), cbData(0), _id(0), need_reply(
false) {}
61 std::function< void() > cbFunction;
92 void* send(
int msgid,
void* arg1,
void* arg2);
94 void* sendCallback(
void* arg1,
void* arg2, callback cb,
void* cbData,
bool highPriority =
false);
97 void sendCallback(
const std::function<
void()>&);
103 void post(
int msgid,
void* arg1,
void* arg2);
105 void postCallback(
int msgid,
void* arg1,
void* arg2, callback cb,
void* cbData);
106 void postCallback(
void* arg1,
void* arg2, callback cb,
void* cbData);
109 void postCallback(
const std::function<
void()>&);
112 void removeCallback(
int msgid, callback cb,
void* cbData);
114 void reply(
void* val);
119 std::vector<message>& lockMessages();
120 void unlockMessages();
124 void _waitReply(
int id);
126 void _runCallbacks();
129 void _pushMessageWaitReply(
message&,
bool highPriority =
false);
131 void _popMessageNoCB(
message&);
132 void _replyLast(
void* val);
135 pthread_mutex_t _mutex;
136 pthread_cond_t _cond;
138 typedef std::vector<message> messages;
Definition: ThreadDispatcher.h:15
Definition: ThreadDispatcher.h:45
–oxgl-end–!
Definition: Actor.h:14
Definition: ThreadDispatcher.h:50
Definition: ThreadDispatcher.h:68