I am trying to run some multithreaded code in python as
from Queue import Queue
q = Queue()
for i,doc in enumerate(doclist):
first, i create a queue and add some stuff to it. Then, i call a method which creates and runs the threads. Here is the
print "Running threads"
for i in range(numThreads):
t = threading.Thread(target=targetMethod)
and here is the
print "Q Worker"
doc = qItem.get()
When i execute the above code, nothing happens. Is my approach correct? what am i missing?