Now it works for blender internal, cycles and other multithreading code in Blender in both background and UI mode.