Execute a single command onto multiple images in multi-threaded fashion

Let’s say I want to apply a command to multiple images at once. Like, in a thread, I’m using command on [0], and in another thread the same command on [1]. How do I do this?

Guessing that threading is automatically managed, so we cannot tell the interpreter how to use threads, except for the basic processing instructions you are already aware of.

I think I might be able to use this: G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing - Reference Documentation - apply_parallel

I forgotten that command as I never had to use it.

Which leaves me to another question, what are limitations here I should know about? The last time I tested it, I recall that dimension returned must be the same. I don’t remember. Could be something else.

I guess you can playtest it. What if the number of images exceeds the number of threads?

I tested it, and it seems to work out. Rarely useful, but in my case, I see a benefit now.