Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Tue, 2011-04-26 at 20:47 +0200, Thorsten Behrens wrote:
Rafael Dominguez wrote:
[...] so my question is should the ref count be thread safe or
not?

Yes, it'll have to. LibO core objects tend to get used from
different threads simultaneously - at least it's truly hard to
verify they're not.

Well, do *all* ref-counted objects have to be thread-safe though?

Making stuff thread-safe comes with an overhead, and in some code
thread-safety isn't really guaranteed, like Calc core.  We currently
require the caller to ensure that multiple threads aren't accessing the
core implementation, which basically translates to a bunch of solar
mutex objects in the UNO API implementations...

So, when we are implementing ref-counted objects in such code, I'd like
not to have the overhead of thread safety.

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida@novell.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.