fix potential race condition
Really, we should move to boost threads ...
Merge pull request #5 from vrabaud/master

fix potential race condition