Running multiple CLIs at once

I was testing running some CLIs at the same time. I was using slicer.cli.run() calls back to back and it is calling a python CLI. However, the second cli run call stays in “Scheduled” status state until the first run call finishes.

Is it possible or some setting I’m missing to make these two run at the same time?

CPU processing was no where near getting maxed out during this time so I’d like to take advantage of more processing power since these two calls are processing independent data.

I should’ve probably specified that I’m using a Slicer nightly build which is about 10 days old.

The behavior is as though I’m specifying wait_for_completion=True argument even though I’m using the default of “False”.

I think there is a single processing thread in vtkSlicerApplicationLogic, which maintains a task queue and executes them one by one. It would probably not too difficult to change the application logic to run multiple tasks at once. If we wanted to make things optimal then the application logic would need to analyze dependencies between CLIs (since you can auto-run CLIs that use outputs of other CLI as inputs), but this is not essential.