iterators+multithreading on win32

Scott Wheeler wheeler at kde.org
Sat Mar 5 11:37:11 CET 2011


On Mar 5, 2011, at 10:59 AM, Николай Шафоростов 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.

No, that wouldn't fix the issue.  TagLib isn't thread-safe at all and  
shouldn't be used from multiple threads simultaneously The biggest  
barriers, off the top of my head, are the copy-on-write usage in the  
containers without atomic reference counters, various static  
initializers and the fact that none of the backing containers that it  
uses (std::foo) are thread-safe (on any platform).

-Scott


More information about the taglib-devel mailing list