-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong Results when using Threading #26
Comments
Hi, can you run it in DEBUG mode? So I can figure out what is going on.
and if you could show me your code that would be a great help. |
I am seeing a similar issue. I run this code on Ubuntu Linux 20.04 LTS and get IP addresses showing that I know are not on my network.
|
Hi, Thank you for the work for this package. I have also noticed very strange behavior when using threads. I am on Windows 10. Here is an example, where I use the
The parts where threads were used is marked with orange boxes. When using just single thread, there is no coloring. What can be seen from the figure?
For reference, here is the simple piece of code used to make the pings behave reasonably with multithreading on Windows: import re
import subprocess
def ping(addr, timeout=60):
out = subprocess.check_output(
("ping", "-w", str(int(timeout) * 1000), addr)
).decode("utf-8")
match = re.search(
r"Minimum = (\d*).*?, Maximum = (\d*).*?, Average = (\d*).*?", out
)
if not match:
return timeout
return float(match.groups()[0]) / 1000 |
when i used threads to ping multiple ips in the same time
after the first request all other pings got None value
and i found that all values got the same id
The text was updated successfully, but these errors were encountered: