+
+ @Override
+ protected void canceling() {
+ Thread thread = getThread();
+ if(thread != null)
+ thread.interrupt();
+
+ try {
+ Thread.sleep(TERMINATE_GRACE_PERIOD);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ return;
+ }
+
+ thread = getThread();
+ if(thread != null)
+ thread.stop();
+ }