-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.0, 4.7.1
-
None
-
Have tried on Gentoo Linux 64bit, Ubuntu Linux 32bit, Windows 7 32bit
-
202433ee1fd377ac36dc55fb466b9fc616b4d4fd
It is impossible to get a running thread into its event loop if exit has been called when the event loop was not running.
In earlier versions, calling exit when the thread's event loop was not running, had no effect, and I can not imagine why this should have been changed by design. Maybe I'm wrong?
Attached is a small program that demonstrates the problem: A worker thread waits in its event loop for something to do. When work arrives, in the form of a call to the work function, exit is called and the thread wakes up, works for a while, and then calls exec and thus returns to waiting state.
If the work function is only called when the thread is in exec, everything works fine, but if the work function is called too frequently, so that exit is called while the thread is "working", the thread can never enter its event loop again.
Try changing the spinbox value, first slowly, and then quickly, while observing the console output, to see the problem.
- relates to
-
QTBUG-13810 exit() or quit() called before start() prevents starting of a thread
-
- Closed
-