Python を使用してマルチスレッド プログラムをコーディングしようとしています。私はPythonに非常に慣れていないので、あなたに共通することを尋ねたら申し訳ありません.
メインの私のコードは次のとおりです。
multi_threads = []
simulator = Simulation(simulation_number)
# Simulation is my class, run() is a member function
for i in range(0, thread_number):
multi_threads.append(Thread(target = simulator.run, args = (start, end,)))
for i in range(0, thread_number):
multi_threads[i].start()
multi_threads[i].join()
とでSimulation::un
:
def run(self, start, end):
# do something...
print "in run"
return
in run
数回見られると思います。しかし、何もないことがわかりました。
私が間違っていることを知ってもいいですか?