How to programmatically stop a multiprocessor function.

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?

+4
source share
1 answer

terminate(), . , , .

0

Source: https://habr.com/ru/post/1619708/


All Articles