Answer the question
In order to leave comments, you need to log in
How to ping several addresses in parallel from one python script?
I read on Habré about multithreading https://habrahabr.ru/post/149420/
The crux of the matter.
There are 10,000 addresses divided into 4 groups that need to be pinged.
How to run it in 4 threads (processes)? The goal is to get such a fork:
Script
Script into one thread (process)..
Script into one thread (process)..
Script into one thread (process)..
Split into 4 threads
| | | |
| | | |
| | | |
| | | |
Script into one thread(process)..
Script into one thread(process)..
Script into one thread(process)..
End.
Those. of the whole script, only the part with ping should go in parallel. Thanks a lot.
Answer the question
In order to leave comments, you need to log in
from the first example from Habr
# join threads to the main thread
t1.join()
t2.join()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question