fixed race condition with 2 threads waiting on the same future
Merge pull request #14 from ggPeti/race_condition_fix

Fixed race condition with 2 threads waiting on the same future