1
0

Pass the response_queue to the constructor, not start().

Removes an unnecessary Thread base-class override.  The python
documentation also strongly discourages overriding anything other
than run().
This commit is contained in:
Neil Booth
2015-05-05 17:24:03 +09:00
parent d6b2cdd595
commit c07e956127
3 changed files with 9 additions and 12 deletions

View File

@@ -25,10 +25,10 @@ def send_request(peers, request):
# start interfaces
q2 = Queue.Queue()
config = SimpleConfig()
interfaces = map ( lambda server: Interface(server, config), peers )
interfaces = map( lambda server: Interface(server, q2, config), peers )
reached_servers = []
for i in interfaces:
i.start(q2)
i.start()
t0 = time.time()
while peers:
try: