title: Efficient way to maintain a lot of independent long running tasks?
body: <p>Need to listen to response from thousands (and may be more in future) of IMAP servers at the same time. What's an efficient way to do this?</p>
  
  <p>The only solution I can come up with is to create one thread for each connection. Is this the way to go?</p>
  
  <p>FYI, I am going implement this in Ruby, but I guess the language of choice does not matter for this question.</p>