Fwd: Unusual behaviour of taglib using threads.

Sergey Vlasov vsu at altlinux.ru
Tue May 1 20:17:56 CEST 2007


On Tue, May 01, 2007 at 09:51:44PM +0530, Yogesh M wrote:
> If TagLib is not threadsafe, then my application is going to have
> *complete* design change (means hardwork of more than 1 yr becomes
> zero).

You can try to wrap all access to TagLib with a global mutex (this
means copying all data and not using any TagLib classes without taking
that mutex - remember that TagLib::String and TagLib::ByteVector are
not threadsafe).

> 1) the test application (tt.tar.bz2)

BTW, your test application has a common bug:

        TagLib::FileRef f(file.toLatin1(), true);

This must be file.toLocal8Bit() - otherwise your program will not work
in non-Latin1 locales with non-ASCII characters in filenames.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.kde.org/pipermail/taglib-devel/attachments/20070501/8c01110c/attachment.pgp 


More information about the taglib-devel mailing list