On quinta-feira, 20 de setembro de 2012 17.38.40, Olivier Goffart wrote:
> I have a change to document more the internal, but it is not merged yet.
> https://codereview.qt-project.org/33739

Staged now, thanks :-)

Tony: I'd really appreciate giving the implementation a thorough once-over.
I've done it once and, after rewriting it, I came up with almost the same
solutions. My implementation only differed that I added a spinlock, by using
the lowest bit on the QMutexPrivate pointer.

I don't think my solution is any better than Olivier's. Both need to spin and
retry: mine with a spinlock, his with that reference-and-recheck you found and
the increment-from-zero in ref() one. I've given some thought on how to
improve on this, but I haven't come up with any better solutions.

If you do have any idea, let us know. And please do it quickly :-)

It is also acceptable to increase the size of QMutex by another pointer, if
that improves the solution considerably.
--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to