AST-945 Protect embedded python code by mutex
Embedded python code can not be run multi threaded. This MR protects the execution of embedded python by a mutex.
An alternative would be to use a Global Interpreter Lock (GIL), but that caused a dead lock in parallel deconvolution.
Edited by Bas van der Tol