I want to launch two or many hosts simultaneously for pinging two others hosts with python in mininet, i do that and doesn't work
def simpleTest(h1,h2):
print (h1.cmd('ping -c5 %s' h2.IP()))
and main :
if __name__ == '__main__':
net = Mininet(...)
threads= 3 # three threads
#....codes......
for i in range(1, threads):
hostsrc=net.hosts[i]
hostdest=net.hosts[i+4]
thread = threading.Thread(target=simpleTest(hostsrc,hostdest))
jobs.append(thread)
for j in jobs:
j.start()
for j in jobs:
j.join()
"""
codes ...
"""
Any solution for that please ...