2012-11-07から1日間の記事一覧
Queue.put()とQueue.getを使う. import threading import thread from Queue import Queue def threaded_func(a, b, q): #return a + b ret = a + b q.put(ret) def main(): q = Queue() th = threading.Thread(target=threaded_func, args=(1, 2, q)) th.s…