commit 8b79b6c4ce91f3974d75bb78d48c689161a3e4b6 Author: juga0 juga@riseup.net Date: Sun Oct 28 15:14:44 2018 +0000
Stop measuring the same relay by 2 threads
After the all the relays in a subset that has been prioritized have been measured, there might be still pending results, what would make that before a thread has ended measuring it, the results have not been dumped and prioritization is calculated again, and that relay will have a high priority. --- sbws/core/scanner.py | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/sbws/core/scanner.py b/sbws/core/scanner.py index b1976ae..aef6f6a 100644 --- a/sbws/core/scanner.py +++ b/sbws/core/scanner.py @@ -357,6 +357,9 @@ def run_speedtest(args, conf): while len(pending_results) >= max_pending_results: time.sleep(5) pending_results = [r for r in pending_results if not r.ready()] + while len(pending_results) > 0: + time.sleep(5) + pending_results = [r for r in pending_results if not r.ready()]
def gen_parser(sub):
tor-commits@lists.torproject.org