JobPreLoad.py - Concurrent Tasks

I’ve written a JobPreLoad.py script for my plugin. Reading the documentation, I
was under the impression that the script would be executed once by a slave prior
to loading the job.

When I set Concurrent Tasks > 1, it appears that the preload script is executed
by each slave thread. This is causing a race condition for me, as I’m trying to
create application config files.

Is this a bug? Is there another method that I should be using?

Hello,

This is actually working as intended, but if you can give us more details, we can try to find a work around.

To elaborate a bit… The JobPreLoad.py script runs for each render thread. There is one per concurrent task, and each runs on it’s own.

I’ve hit that pitfall myself trying to deal with cleaning up the ‘set After Effects to english’ feature. There was a file we needed to delete. I didn’t really find a good way around that one.

I’m trying to create application settings files (.ini) on the slave.
This needs to be done once before any render threads execute.

Hi,

Have you tried using the “PluginPreLoad.py” option?
docs.thinkboxsoftware.com/produc … e-optional

If that still isn’t early enough for you, than if you introduce a ‘mutex’ (can just be a dummy empty file) and check for it’s existence, prior to editing/creating any application INI file, then you won’t hit a race condition.