Add memory fences around worker loop.