Palpatine
21st May 2009, 08:55
I inherited qthread and in the run() I delared two HANDLEs and asked an outside library to fill them with event(s) then run some non-qt threads that ends by emitting these events.
When I was using non-qt threads I can simply call waitformultipleobjects() to wait for the return of these outside threads, but now whenever I call waitformultipleobjects() the qthread crashes.
Any idea why this happens? I suspect it's because QApplication converts the two events to QEvents, but how am I supposed to handle these kind of QEvents? Or can I declare QEvents and hand QEvents to the outside thread as HANDLEs?
When I was using non-qt threads I can simply call waitformultipleobjects() to wait for the return of these outside threads, but now whenever I call waitformultipleobjects() the qthread crashes.
Any idea why this happens? I suspect it's because QApplication converts the two events to QEvents, but how am I supposed to handle these kind of QEvents? Or can I declare QEvents and hand QEvents to the outside thread as HANDLEs?