if __name__ == '__main__':
    pool_size = 255
jobs = multiprocessing.Queue()
results = multiprocessing.Queue()
pool = [multiprocessing.Process(target=pinger, args=(jobs, results)) for i in
    range(pool_size)]
for p in pool:
    p.start()
for i in range(1, 255):
    jobs.put('192.168.1.{0}'.format(i))
for p in pool:
    jobs.put(None)
for p in pool:
    p.join()
while not results.empty():
    ip = results.get()
print(ip)
Fast ping sweep in python