FireBird/LibreOffice: fb_config/pkg-config, thread-safety, eager caching
Lionel Elie Mamane
lionel at mamane.lu
Tue Jul 23 05:24:18 PDT 2013
On Fri, Jul 19, 2013 at 08:35:07AM +0200, Andrzej J. R. Hunt wrote:
> On Fri, 2013-07-19 at 04:40 +0200, Lionel Elie Mamane wrote:
>> 2) This is a bit scary in the Debian package description of
>> libfbembed:
>> Contrary to libfbclient, libfbembed is not thread-safe.
>> Taking a quick look at e.g. OResultSet::ensureDataAvailable,
>> it is mutexed, but (as far as I understand) with a *different*
>> mutex for each instance (for each object). So this does not keep
>> multiple ResultSets from making parallel calls to non-thread-safe
>> libfbembed from different threads.
> Yes, I'll probably have to have a mutex on the Connection then which all
> the other objects use (I'm not entirely sure -- can we have multiple
> files open independently in parallel withe each connection having its
> own mutex, or does the entire driver need to have one mutex)?
If it were not thread-safe, then the entire driver needs a
mutex. However, we just got the information that since 2.5.0,
libfbembed is thread-safe, so there is no mutexing necessary for the
driver. Any mutexing that is putatively necessary at a lower level (in
OResultSet or in OConnection) would only be necessary because of the
structure of these classes.
--
Lionel
More information about the LibreOffice
mailing list