56 event = CreateEvent(NULL,
TRUE,
FALSE, NULL);
88 wce->
priority = GetThreadPriority(GetCurrentThread());
93 for (; index < queue.count(); ++
index)
99 queue.insert(index, wce);
107 WaitForSingleObject(wce->
event, INFINITE);
115 int idx = queue.find(wce);
118 ResetEvent(wce->
event);
119 freeQueue.append(wce);
122 if (wce->
wokenUp && !queue.isEmpty())
125 SetEvent(other->
event);
143 if (!
d->queue.isEmpty())
145 qWarning(
"QWaitCondition: Destroyed while threads are still waiting");
165 for (
uint i = 0; i <
d->queue.count(); ++i)
168 if (current->
wokenUp)
continue;
169 SetEvent(current->
event);
179 for (
uint i = 0; i <
d->queue.count(); ++i)
182 SetEvent(current->
event);
void wait(std::chrono::milliseconds dur)
void post(QWaitConditionEvent *wce)
void qWarning(const char *msg,...)
QWaitConditionEvent * pre()
Event finding and building.