changed synchronization

Master is now only synchronized on iterating the workerQueue instead of
on the entire method