String::detach() not thread-safe?

Scott Wheeler wheeler at
Sat Nov 15 13:46:55 UTC 2014

> On Nov 15, 2014, at 1:59 PM, Kevin André <hyperquantum at> wrote:
> With some googling I learned that multithreading issues in taglib were
> discussed before […]

Originally TagLib was never intended to be thread safe.  Little bits have been added over time, but they’ve mostly been band-aids.  At the time the main reason for that was that it didn’t make sense to use TagLib from multiple threads:  for reading from a hard disk, it’s a bad idea to read using multiple threads.  Tag reading isn’t CPU bound except when all of the data is already in disk buffers and for disk IO, you’ll get worse performance by doing heavy reading from multiple threads (it’ll increase the number of seeks).  I don’t know if this has changed with SSDs, but it’d be worth benchmarking before assuming “more concurrent threads” == “faster” in your application.  (Remember to purge the disk buffers before testing.)


More information about the taglib-devel mailing list