Reduce thread synchronization overhead.
Merge pull request #26 from jimpurbrick/master

Reduce thread synchronization overhead.