Undo the changes to safe_worker function so it works as before. Introduce do function with the new semantics of the previous safe_worker function.