Change spin loop to a sleep loop.
Merge pull request #1 from oremj/spin_to_sleep

Change spin loop to a sleep loop.