Running multiprocessing inside of tk-multi-publish2 hooks

Hello,

Just checking if this is possible or if there are any red flags/reasons as to why this wouldn’t work?

I’m hoping to be able to run multiple instances of txmake during a publish process.
However I’m hitting walls when using multiprocessing.Pool. The publisher UI/window freezes.
Not entirely sure I’m approaching this the correct way either.

Any help/advice on doing something like this would be greatly appreciated :slight_smile:

Thanks for your time!

1 Like

This is a classic problem, the subprocesses need to be managed in another thread.
But beware that that thread does not do something with the DCC api, otherwise might crash.

2 Likes

Thanks for the reply mmoshev.
That helped jog me along.
It’s working now, just needed to make sure I was launching another threadpool, and that all functions were outside of the hook class.

Thanks!

1 Like