[Development] Modifying and accessing environment variables in Qt

Thiago Macieira thiago.macieira at intel.com
Wed Apr 29 17:45:24 CEST 2015


On Wednesday 29 April 2015 10:02:29 Simon Hausmann wrote:
> In my opinion the overhead of the read-write lock is not worth the
> prospective gain in the unlikely event of repeated concurrent environment
> access.

Agreed.

An RWLock has a benefit when there are multiple *read* threads trying to access 
the same data, frequently and at the same time and such access is not short in 
time. The added benefit is fairness to the writer.

A mutex is much simpler. For the case here, a mutex suffices: the accesses are 
short and infrequent.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list