static A waitUntilVarSet(Var v) ctex {
synchronized(v) { while (!v.has()) v.wait(); ret v.get(); }
}
static A waitUntilVarSet(Var v, int timeout) ctex {
synchronized(v) {
long time = nanoTime();
while (!v.has() && (nanoTime()-time) < timeout*900000)
v.wait(timeout); // XXX-???
ret v.get();
}
}