Blocking io used to handle prod-cons sync

Using methods from LDD3 chapter 6.2 to synchronize between producer
and consumer thread.

Signed-off-by: Sunil Shahu <sunil.shahu@sibridgetech.com>