Most microcontroller platforms implement a watchdog timer that resets the controller if it detects a freeze. It does that by checking to see if the code has yielded. On some, a delay() that exceeds the watchdog timer's limits will initiate a reset.
This "safe" delay yields to the stack every tick to create a "blocking" delay in user code; however, internal functions like the watchdog timer are not blocked. It optionally prints a dot every second.