Re: [Development] Thread-safety on implicitly-shared classes

2012-02-06 Thread Marc Mutz
Hi Thiago, On Sunday February 5 2012, Thiago Macieira wrote: > However, in practice, many people have begun relying on an implementation > detail that read-only operations (the const methods) in those classes are > thread-safe. That is, a shared object can be accessed without mutex > protection pr

Re: [Development] Thread-safety on implicitly-shared classes

2012-02-05 Thread Thiago Macieira
On Sunday, 5 de February de 2012 17.10.55, lars.kn...@nokia.com wrote: > Yes, so we can either go through and clean them all up at once (best, > since it might require API changes as with QString::utf16()), or introduce > a new name for this kind of thread safety and document which classes work > t

Re: [Development] Thread-safety on implicitly-shared classes

2012-02-05 Thread lars.knoll
On 2/5/12 5:30 PM, "ext Thiago Macieira" wrote: >Hi all > >During the QJsonDocument review process, I pointed out a problem with >using >const_cast that I argued was a violation of the thread-safety rules. Lars >disagreed, so we talked here at FOSDEM. Strict reading of the docs at > http:/

[Development] Thread-safety on implicitly-shared classes

2012-02-05 Thread Thiago Macieira
Hi all During the QJsonDocument review process, I pointed out a problem with using const_cast that I argued was a violation of the thread-safety rules. Lars disagreed, so we talked here at FOSDEM. Strict reading of the docs at http://developer.qt.nokia.com/doc/qt-4.8/threads-reentrancy.htm