/** This method is executed when the thread is started. */ @Override public void run() { try { wait_lock.lock(); waiting = true; wait_object.await(wait_deadline); } catch (Throwable dart) { exception = dart; } finally { waiting = false; wait_lock.unlock(); } // terminate }
public void setWaitingThread(final WaitingThread waitingThread) { this.waitingThread = waitingThread; if (this.aborted) { waitingThread.interrupt(); } }