using condition variable in thread dispatcher
changed thread dispatcher to use condition_variable
Merge pull request #10 from miguelibero/fix/busy_wait

Fix/busy wait