python threading blocks

This calls the function and passes its result as target:

threading.Thread(target=DoWorkItem(), args=())

Lose the parentheses to pass the function object itself:

threading.Thread(target=DoWorkItem, args=())

Leave a Comment