def worker():
    """
    The worker thread pulls an item from the queue and processes it
    """

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

    The worker thread pulls an item from the queue and processes it
    
recipes/Python/579023_Python_SQLSMO__Threading_Example/recipe-579023.py