static A waitForVarPredicate(Var v, IF0 pred) ctex { synchronized(v) { while (!pred!) v.wait(); ret v!; } }