[Development] QBasicMutex::lockInternal() race condition?

Tony Van Eerd tvaneerd at rim.com
Thu Sep 20 21:13:05 CEST 2012


> -----Original Message-----
> From: development-bounces+tvaneerd=rim.com at qt-project.org
> [mailto:development-bounces+tvaneerd=rim.com at qt-project.org] On Behalf
> Of Thiago Macieira
> Sent: Thursday, September 20, 2012 1:29 PM
> To: development at qt-project.org
> Subject: Re: [Development] QBasicMutex::lockInternal() race condition?
> 
> On quinta-feira, 20 de setembro de 2012 16.53.23, Tony Van Eerd wrote:
> > > Tony: I'd really appreciate giving the implementation a thorough
> once-
> > > over.
> >
> > I will try to find the time, although I'm already further down the
> rabbit
> > hole than I should be.  I was really investigating what can be used
> in a
> > static context, and what can't.  Would you recommend that client code
> use
> > QBasicMutex when static mutexes are needed (which is a common use for
> > mutexes).  Like the recent changes done for Qt internals?
> 
> QBasicAtomic and QBasicMutex are PODs, but QBasicTimer isn't.
> Additionally,
> QElapsedTimer is POD.
> 
> But QBasicAtomic and QBasicMutex are private classes. You should not
> use them
> outside Qt code -- at least, not yet. For Qt 5.1, I want to make
> QBasicAtomic
> public and documented. QBasicMutex will require some more thinking.
> 

Of course QBasicMutex is still in qmutex.h, so not very private.  I'm tempted to recommend it for _internal_RIM_library_code_ which is fairly version-locked to the Qt code anyhow.

Tony


---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.



More information about the Development mailing list