/* */
/* */ public final void doCancellations()
/* */ {
/* */ while (true)
/* */ {
/* */ ReaperElement e;
/* 537 */ synchronized (this._workQueue)
/* */ {
/* */ try
/* */ {
/* 541 */ e = (ReaperElement)this._workQueue.remove(0);
/* */ } catch (IndexOutOfBoundsException ioobe) {
/* 543 */ break;
/* */ }
/* */
/* */ }
/* */
/* 551 */ if (tsLogger.arjLogger.debugAllowed())
/* */ {
/* 553 */ tsLogger.arjLogger.debug(16L, 4L, 1L, "Reaper Worker " + Thread.currentThread() + " attempting to cancel " + e._control.get_uid());
/* */ }
/* */
/* 559 */ boolean cancelled = false;
/* 560 */ boolean excepted = false;
/* */
/* 562 */ synchronized (e)
/* */ {
/* 564 */ e._worker = Thread.currentThread();
/* 565 */ e._status = 2;
/* 566 */ e.notify();
/* */ }
/* */
/* */ try
/* */ {
/* 575 */ if (e._control.running())
/* */ {
/* 579 */ if (e._control.cancel() == 4)
/* */ {
/* 581 */ cancelled = true;
/* */ }
/* */ }
/* */ }
/* */ catch (Exception e1)
/* */ {
/* 587 */ excepted = true;
/* */ }
/* */
/* 594 */ synchronized (e)
/* */ {
/* 596 */ if (e._status == 6)
/* */ {
/* 604 */ ReaperWorkerThread worker = (ReaperWorkerThread)Thread.currentThread();
/* 605 */ worker.shutdown();
/* */
/* 607 */ synchronized (this)
/* */ {
/* 609 */ _zombieCount -= 1;
/* */ }
/* */
/* 612 */ if (tsLogger.arjLoggerI18N.isDebugEnabled())
/* */ {
/* 614 */ tsLogger.arjLoggerI18N.debug(1024L, 4L, 1L, "com.arjuna.ats.internal.arjuna.coordinator.ReaperThread_13", new Object[] { Thread.currentThread(), e._control.get_uid(), new Integer(_zombieCount) });
/* */ }
/* */
/* 629 */ break;
/* */ }
/* 631 */ if ((cancelled) && (e._status == 3))
/* */ {
/* 638 */ cancelled = false;
/* 639 */ e._status = 4;
/* 640 */ e.notify();
/* */ }
/* */ else
/* */ {
/* 644 */ e._status = (cancelled ? 5 : 4);
/* */
/* 647 */ e.notify();
/* */ }
/* */
/* */ }
/* */
/* 655 */ if (cancelled)