I want to call multiple functions on the elements of a list with QtConcurrent::mapped
. How can I do that? One way would be to to create a composite function and pass that to mapped
. However I imagine that might have some drawbacks if the individual pieces of work take different amounts of time.
Is there a way to chain multiple calls to mapped
? I would like it to apply the second function on an element as soon as the first function is finished. It should not process all elements with the first function first before starting with the second.
I'm looking for something like:
QtConcurrent::blockingMapped(QtConcurrent::mapped(images, scale), rotate);
What I don't want:
QtConcurrent::blockingMapped(images, scale);
QtConcurrent::blockingMapped(images, rotate);