doesnt use thead.stop() anymore

This commit is contained in:
hns 2001-01-25 20:57:30 +00:00
parent d807e4a340
commit 857544fd9b

View file

@ -194,11 +194,13 @@ public class Transactor extends Thread {
if (active) {
active = false;
if (txn != null) {
nmgr.db.abortTransaction (txn);
txn = null;
}
IServer.getLogger().log (tname+" aborted after "+(System.currentTimeMillis()-tstart)+" millis");
}
}
public synchronized void kill () {
killed = true;
@ -206,22 +208,15 @@ public class Transactor extends Thread {
// evaluator, so we can hope that it stops without doing anything else.
try {
join (500);
} catch (InterruptedException ir) {
Thread.currentThread().interrupt();
}
} catch (InterruptedException ir) {}
// Interrupt the thread if it has not noticed the flag (e.g. because it is busy
// reading from a network socket).
if (isAlive()) {
interrupt ();
try {
join (3000);
} catch (InterruptedException ignore) {
Thread.currentThread().interrupt();
}
if (isAlive())
// Sorry to be so rude...
stop (new TimeoutException());
join (1000);
} catch (InterruptedException ir) {}
}
}