Пример #1
0
 @Override
 public void interrupted() {
   if (performed) {
     return;
   }
   performed = true;
   if (timerId >= 0) {
     Platform.killSchedule(timerId);
     timerId = -1;
   }
   Platform.postpone(() -> callback.error(new TInterruptedException()));
 }
Пример #2
0
 @Override
 public void run() {
   if (performed) {
     return;
   }
   performed = true;
   if (timerId >= 0) {
     Platform.killSchedule(timerId);
     timerId = -1;
   }
   TThread.setCurrentThread(currentThread);
   monitorEnterWait(obj, lockCount, callback);
 }