title: Python Multithreading Queue
body: <pre><code>import threading
  from queue import Queue
  
  
  
  print_lock = threading.Lock()
  def job(worker):
      with print_lock:
          with open('messages.txt') as f:
              for line in f:
                  print(line)
  
  def reader():
      while True:
          worker = q.get()
          job(worker)
          q.task_done()
  
  q = Queue()
  
  for x in range(10):
      t = threading.Thread(target=reader)
  
      t.daemon = True
      t.start()
  
  
  for worker in range(1):
      q.put(worker)
  
  q.join()
  </code></pre>
  
  <p>So what i want is each thread reads different messages,</p>