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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user