[Development] Allowing event delivery prior to and after QCoreApplication

Thiago Macieira thiago.macieira at intel.com
Tue Apr 14 16:28:03 CEST 2015


On Tuesday 14 April 2015 09:46:09 René J.V. Bertin wrote:
> 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?

I don't know how to answer this since I have no idea what retain/release is 
and does. Can you explain?
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list