fix race condition in mutex release
Merge pull request #19 from plawatsch/master

fix race condition in mutex release