App only spawns one thread
- by tipu
I have what I thought was a thread-friendly app, and after doing some output I've concluded that of the 15 threads I am attempting to run, only one does.
I have
if __name__ == "__main__":
fhf = FileHandlerFactory()
tweet_manager = TweetManager("C:/Documents and Settings/Administrator/My Documents/My Dropbox/workspace/trie/Tweet Search Engine/data/partitioned_raw_tweets/raw_tweets.txt.001")
start = time.time()
for i in range(15):
Indexer(tweet_manager, fhf).start()
Then in my thread-entry point, I do
def run(self):
print(threading.current_thread())
self.index()
That results in this: <Indexer(Thread-3, started 1168)>
So of 15 threads that I thought were running, I'm only running one. Any idea as to why?
Edit:
code