[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Implement workaround a race condition that happens when calling next on generator.
commit 8058d81e0dc5307808fd300267e17b5997d1e1dd
Author: Arturo Filastò <art@xxxxxxxxx>
Date: Fri Jan 3 20:03:00 2014 +0100
Implement workaround a race condition that happens when calling next on generator.
---
ooni/managers.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ooni/managers.py b/ooni/managers.py
index 348343f..f6af282 100644
--- a/ooni/managers.py
+++ b/ooni/managers.py
@@ -58,6 +58,11 @@ class TaskManager(object):
self._run(task)
except StopIteration:
break
+ except ValueError as exc:
+ # XXX this is a workaround the race condition that leads the
+ # _tasks generator to throw the exception
+ # ValueError: generator already called.
+ continue
def _run(self, task):
"""
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits