//print.ln("read ok");
return;
}
if(t==Thread.currentThread()) {
//aprint.err(path);
Config config = ThreadLocalPageContext.getConfig();
if(config!=null)
SystemOut.printDate(config.getErrWriter(),"conflict in same thread: on "+path);
//throw new RuntimeException("conflict in same thread: on "+res);
return;
}
// bugfix when lock von totem thread, wird es ignoriert
if(!t.isAlive()) {
resources.remove(path);
return;
}
if(start==-1)start=System.currentTimeMillis();
try {
token.wait(lockTimeout);
now=System.currentTimeMillis();
if((start+lockTimeout)<=now) {
Config config = ThreadLocalPageContext.getConfig();
if(config!=null)
SystemOut.printDate(config.getErrWriter(),"timeout after "+(now-start)+" ms ("+(lockTimeout)+" ms) occured while accessing file ["+path+"]");
else
SystemOut.printDate("timeout ("+(lockTimeout)+" ms) occured while accessing file ["+path+"]");
return;
}
}