> w = q_work.get(1) # wait for reply from worker thread Oops !!! That line should read w = q_in.get(1) # wait for reply from worker thread -- Tim Williams