Diffusion Juk 24b0edd1545c

Fix crash with threaded file loading.

Authored by mpyne on Feb 18 2019, 8:44 PM.

Description

Fix crash with threaded file loading.

Although Qt protects access to functions in the GUI thread (where I was
seeing crashes in the new threaded file loading code in some
situations), as long as you use signals/slots, Qt Concurrent doesn't do
anything to keep your non-GUI threaded code from trampling on each
other.

Which is obvious enough, in retrospect, but that seems to have been the
reason for the crashes I was sometimes seeing (TagLib and/or FileHandle
not being thread-safe).

The immediate bugfix is to serialize access into FileHandle/TagLib file
reading code in DirectoryLoader, though I also did some cleanups in the
process of debugging that I think are worth keeping.

Details

Committed
mpyneFeb 18 2019, 8:44 PM
Parents
R344:0930c648ea60: Fix typo README.md
Branches
Unknown
Tags
Unknown