I am reading hundreds of tweets where I inspect the URLs. I am using multithreading for this task as the URL reading takes more than a second. However, I am not sure how many threads can I run in parallel at a time in this situation?
import Queue
import threading
q = Queue.Queue()
thread limit = 100
for tweet in tweets[0:threadlimit]:
t = threading.Thread(target=process_tweet, args=(q, tweet))
t.daemon = True
t.start()
for tweet in tweets[0:threadlimit]:
tweet = q.get()
The reason I am asking this that when I use a thread limit of 100 then it works fine but for a threadlimit of 200, it gets stuck.
Platform: Linux