Python Multiprocessing Error?
I have been studying multiprocessing module in Python for few days.
However, I have met a strange problem that I cannot resolve it.
The source code is very simple but I cannot get any results after running
this code.
The code is as follows:
import multiprocessing as multi
def worker():
print "Worker!!!"
return
jobs = []
for i in range(5):
p = multi.Process(target = worker)
jobs.append(p)
p.start()
I was expecting to get a five time of printing "Worker!!!".
However, the only thing I've got is
* Remote Interpreter Reinitialized *
">>>"
">>>"
Does anybody who has a idea to solve this problem??
Please DO HELP ME!!!
No comments:
Post a Comment