You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
it won't get the right result when use multithread to ping #1
The reason that this happened is "os.getpid()" returns the same number while multithreading.
os.getpid() returns different number while multiprocessing.
the way to solve this is replace "my_ID = os.getpid() & 0xFFFF" by "my_ID = threading.current_thread().ident & 0xFFFF"(py3) in do_one() function.
Activity
roeften commentedon Jun 24, 2016
The issue is that the reply code is not checked, success is reported on any reply
a start would be to actually check the code:
patch.txt
kyan001 commentedon Jul 7, 2016
I met this problem too.
The reason that this happened is "os.getpid()" returns the same number while multithreading.
os.getpid() returns different number while multiprocessing.
the way to solve this is replace "my_ID = os.getpid() & 0xFFFF" by "my_ID = threading.current_thread().ident & 0xFFFF"(py3) in do_one() function.
I'll fix this in ping3.py and ask for a merge.
before the pull request works, see my branch @ https://github.com/kyan001/python-ping