あなたはこのようなものが欲しいです:
import socket
import threading
import Queue
import subprocess
class IPThread(threading.Thread):
    def __init__(self, queue, num):
        super(IPThread, self).__init__()
        self.queue = queue
        self.num = num
    def run(self):
        while True:
            try:
                args = self.queue.get_nowait()
                cmd = ["echo"] + [str(i) for i in args]
                p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
                out, err = p.communicate()
                print out
            except Queue.Empty:
                # Nothing left in the Queue -- we are done
                print "Queue %d done" % self.num
                break
            except Exception as err:
                # Handle exception
                print err
            self.queue.task_done()
def create_threads(q, size):
    for i in range(size):
        thread = IPThread(q, i)
        thread.setDaemon(True)
        thread.start()
    q.join()
def fill_queue(q):
    # Call q.put(args) in a loop to populate Queue with arguments
    from itertools import permutations
    x = list(range(20))
    for arg1, arg2 in permutations(x, 2):
        q.put([arg1, arg2])
    print q.qsize()
def main():
    q = Queue.Queue()
    fill_queue(q)
    create_threads(q, 60)
    print "Done"
if __name__ == '__main__':
    main()
作業するもののキューを作成します。Threadから派生したクラスを特殊化します。スレッドをスピンアップします。それらが完了するのを待ちます。
タスクの出力が互いに干渉しているため、タスクが同時に実行されていることがわかります。それは機能です!