title: Queue.Queue vs semaphores, locks, etc. in multithreaded Python code
body: <blockquote>
    <p>The principal challenge of
    multi-threaded applications is
    coordinating threads that share data
    or other resources. To that end, the
    threading module provides a number of
    synchronization primitives including
    locks, events, condition variables,
    and semaphores.</p>
    
    <p>While those tools are powerful, minor
    design errors can result in problems
    that are difficult to reproduce. So,
    the preferred approach to task
    coordination is to concentrate all
    access to a resource in a single
    thread and then use the Queue module
    to feed that thread with requests from
    other threads. Applications using
    Queue.Queue objects for inter-thread
    communication and coordination are
    easier to design, more readable, and
    more reliable.</p>
  </blockquote>
  
  <p>It, basically, states to use Queue.Queue for inter-thread communication and coordination, instead of the powerful tools such as semaphores, locks, etc.</p>
  
  <p>My question is, what's the drawback of the suggested method?  When should one use the more "powerful tools" instead, and why?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>To be clear, I know what semaphores are.  I was just wondering why the Python documentation suggests to use the Queue.Queue method instead of the "powerful tools" -- I'm simply using the documentation's own verbiage, not coming up with my own.</p>