multiprocessing.Pool mapthe function is extremely useful for parallelizing data processing; it automatically creates pieces from the original list and transfers them to various workers.
Sometimes you look through a list to find the only element that checks a function (for example, breaking a password, checking predicates). In this case, you are not interested in receiving a card of all inputs, but only one that checks the check.
What is the best way to automatically parallelize these tasks?
source
share