Replace some spinwaits for increased performance

Significant performance increase in some environments
Merge pull request #14 from madikasu/trunk

Replace some spinwaits for increased performance