[Development] Question about QCoreApplicationData::*_libpaths

Marc Mutz marc.mutz at kdab.com
Thu Jan 21 11:06:13 CET 2016


On Thursday 21 January 2016 05:33:51 Kevin Kofler wrote:
> Marc Mutz wrote:
> > You can lock a mutex in the function and unlock it in the shared_ptr's
> > deleter.
> 
> How can that possibly be faster than atomic reference counting? You have
> the same cross-thread dependence plus a potential wait for the thread to
> actually do its work. Not to mention that mutexes can cause deadlocks,
> atomic reference counts can't.

Ivan was talking about thread-safe classes. You need to lock a mutex to take 
the copy.

-- 
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt Experts



More information about the Development mailing list