added check to wait for required number of free ring slots
Merge pull request #46 from balrajsingh/master

Added check to wait for required number of ring slots before writing