Finally condition_variable works and the tests are all green.
Now I have to start documenting everything.