Need for while True:
<p>I don't understand why "while True:" is needed in below example</p>

<pre><code>  import os
  import sys
  import subprocess
  import time
  from threading import Thread
  from Queue import Queue

  def worker():
     while True:
          item = q.get()
          do_work(item)
          q.task_done()

  def do_work(item):
      time.sleep(item)
      print item


  q = Queue()
  for i in range(2):
       t = Thread(target=worker)
       t.daemon = True
       t.start()

  source = [2,3,1,4,5]

  for item in source:
      q.put(item)

  q.join()
</code></pre>
