[Development] Allowing event delivery prior to and after QCoreApplication
René J.V. Bertin
rjvbertin at gmail.com
Tue Apr 14 09:46:09 CEST 2015
On Monday April 13 2015 21:12:58 Thiago Macieira wrote:
Hello,
>> I'd like some opinions on whether we should try this or not.
>
>Note another problem: if a thread is running and delivering events while the
>QCoreApplication gets destroyed, the application will have several race
>conditions:
> 1) data races accessing QCoreApplicationPrivate::is_app_closing
> 2) TOCTOU race in QCoreApplication::sendEvent for the existence of
>QCoreApplication
>
>So I have to ask: do we NEED to use QCoreApplication::notify() virtual outside
>the main thread?
Not that I have any intimate knowledge of the inner workings you're discussing, but this sounds like the kind of situation ObjC avoids with its retain/release scheme. Would it help if you somehow imposed such a scheme on central classes like QCoreApplication?
R.
More information about the Development
mailing list