Draft: Issue #2354: Query & Initialize plug-ins with threads
This patch attempts to resolve Issue #2354.
It creates thread pools to query and initialize each plug-in on first load. This should speed up the process on Windows especially, where this part is a bit slow.
I'm setting it as a draft since I haven't worked with threads in GTK or GIMP much, so I'm not confident I did this correctly.
EDIT: Hmm, looks like I've just been lucky and didn't fix the out-of-sync problem.
What I think is happening is that either multiple registrations are happening at once, or the procedure information is being "switched" while one procedure is being registered. If you look at the pipeline errors, you'll see the mismatch:
Plug-in "[file-aa]"
(/builds/GNOME/gimp/_build/plug-ins/common/file-aa)
attempted to register the sensitivity mask "0" for procedure "[file-wmf-load-thumb]".
It has however not installed that procedure. This is not allowed.
There it seems like file-aa is trying to load a procedure from file-wmf. I don't know if I need to better protect the data here, or dive in further into the registration code to "lock" it.