Skip to content

Make most FileIndexerConfig methods to be thread-safe

Dāvis Mosāns requested to merge davism/baloo:threadsafe into master

For a while I've been working on implementing multi-threaded metadata loading for Dolphin. For example if you have a folder with 1000 files you could split it over 2 threads with 500 files in each (just example). My implementation is using threadpool from ThreadWeaver.

To have it working some code needs to be thread safe. This MR allows sharing FileIndexerConfig across worker threads because I don't see any point in copying it as it contains shared state/cache that doesn't really make sense to be filled separately in every thread.

In this MR's commits I have included !109 (closed) aswell but this can be rebased once that is merged.

Also by the way I noticed that Baloo doesn't really use PImpl. Don't know what's the ABI stability guarantee for it but I think that should be done now before v6.0 release. Otherwise change like this would break ABI.

cc @meven

Merge request reports