Callers block until getFoo() has a value ready?
- by Sean Owen
I have a Java Thread which exposes a property which other threads want to access:
class MyThread extends Thread {
private Foo foo;
...
Foo getFoo() {
return foo;
}
...
public void run() {
...
foo = makeTheFoo();
...
}
}
The problem is that it takes some short time from the time this runs until foo is…