App only spawns one thread
        Posted  
        
            by tipu
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by tipu
        
        
        
        Published on 2010-05-10T06:34:02Z
        Indexed on 
            2010/05/10
            7:14 UTC
        
        
        Read the original article
        Hit count: 363
        
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
© Stack Overflow or respective owner