[Interest] QMap and thread-safe.

Giuseppe D'Angelo dangelog at gmail.com
Tue Jul 23 13:34:50 CEST 2013


On 23 July 2013 13:25, Bill Crocker <william.crocker at analog.com> wrote:
> Hi all:
>
> The QMap class states that all member functons are reentrant, but
> if I populate a map at program start-up (with QStrings, let's say) and I
> do not change its contents from then on... I should be able to treat the
> member function ::contains() and any other member function which does not
> modify the map as thread-safe.
>
> Is true?

Probably yes, although totally undocumented. (There has been some
discussion before the release of 5.0 -- about whether we should make
it official that using only "const" methods on containers makes them
thread safe, but I don't remember the outcome...)

HTH,
--
Giuseppe D'Angelo



More information about the Interest mailing list