+ // std::condition_variable-like variant that evaluates the associated condition
+ template<typename Functor>
+ wxCondError Wait(const Functor& predicate)
+ {
+ while ( !predicate() )
+ {
+ wxCondError e = Wait();
+ if ( e != wxCOND_NO_ERROR )
+ return e;
+ }
+ return wxCOND_NO_ERROR;
+ }
+