opdenkamp/xbmc — comment on commit b4a1dcac8c9f979a71356d5b2054bdc0d3d111a2
File:  line 0
By FernetMenta:

Not sure what you are trying to accomplish. CCondition now looks like a binary event with auto reset. This does not solve the problem with the socket. It still can come out of wait with useCount != 0. From the socket's perspective the predicate is useCount. Since you allow to pass a mutex to the wait function, the solution in this case is quite simple: 12c221e8264f7739244d8c46a6ec9e854acd7542
I see the following options:
1)
Have a generic implementation of CCondition and pass the predicate as an evaluation expression e.g. by a function pointer or leave it to the upper layer. The latter might lead to wring usage of the class.

2)
Rename CCondition to CEvent and build the behavior needed on top of this. Don't pass the outer mutex into this class.