So I have the following program:
https://github.com/eWizardII/homobabel/blob/master/Experimental/demo_async_falcon.py
However, when it’s run I only get two active threads are running, how can I make it so that there are more threads running. I have tried doing stuff like urlv2 = birdofprey(ip2) where ip2 = str(host+1) however that just ends up sending the same thing to two threads. Any help would be appreciated.
Thanks,
Active count=2 means that you have one of your designed thread (
birdofprey), and the main thread. This is because you use lock, so the secondbirdofpreythread waits for the first and so on. I didn’t get deeper into the algorithm, but it seems that you don’t need to lockbirdofpreythreads, since they don’t share any data (I could get wrong). If they share, you should make exclusive access to the shared data, and not to lock the whole body ofrun.Update upon comment
storage_iis not a shared data.);forloop` create threads, start them, append to a list;joincollect the information you need.