[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglib-devel
Subject:    Re: iterators+multithreading on win32
From:       Luk Lalinsk <lalinsky () gmail ! com>
Date:       2011-03-05 10:37:42
Message-ID: AANLkTi=iAROk_r2-K-yYPK6Roxd7mnT0mRuaHsbAgoOt () mail ! gmail ! com
[Download RAW message or body]

On Sat, Mar 5, 2011 at 10:59 AM, Николай Шафоростов <shafff@ukr.net> \
wrote:
> Hi. We're getting crashes when using taglib from different threads (different \
> files) on windows all of them are in the crt functions called from std iterators \
> (e.g. String's basic_string<ushort> iterator used in isLatin() methid, and also \
> ByteVector's iterators). 
> The hypothesis is that std iterators are not thread-safe on win32.
> 
> What do you think if i convert the code to not use iterators (e.g. ifdefing the \
> code)?

The main problem is that TagLib uses non-thread-safe reference
counting on shared objects. Until this is fixed, you should not use
TagLib from multiple threads (yes, even on different files).

I'm not aware of any code in TagLib that would use STL iterators
across functions that could potentially get called from different
threads, so I don't believe that's the problem.

Lukas
_______________________________________________
taglib-devel mailing list
taglib-devel@kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic