It's pretty hard to run out of reef provided you have enough air. You just cross over to the next one...
The current plays a role as well. When I was on Cozumel last May the current was absolutely ripping the whole time we were there. On a dive on Cedral Wall, we actually dove three reefs; we ended up most of the way through Santa Rosa.