I just happened to notice that this code can end up giving us two or more pools of agents. While not fatal, it is at least unexpected.
private static Pool instance;
static Pool instance() {
if (instance == null)
instance = new Pool();
return instance;
}
private static Pool instance;
static Pool instance() {
if (instance == null)
instance = new Pool();
return instance;
}