/** Start the task. * When it finishes (even with an exception) it calls * {@link #notifyFinished}. * Subclasses may override this method, but they * then need to call {@link #notifyFinished} explicitly. * <p>Note that this call runs synchronously, but typically the creator * of the task will call this method in a separate thread. */ public void run() { try { notifyRunning(); if (run != null) { run.run(); } } finally { notifyFinished(); } }
/** Start the task. * When it finishes (even with an exception) it calls * {@link #notifyFinished}. * Subclasses may override this method, but they * then need to call {@link #notifyFinished} explicitly. * <p>Note that this call runs synchronously, but typically the creator * of the task will call this method in a separate thread. */ public void run() { try { notifyRunning(); if (run != null) { run.run(); } } finally { notifyFinished(); } }
/** Start the task. * When it finishes (even with an exception) it calls * {@link #notifyFinished}. * Subclasses may override this method, but they * then need to call {@link #notifyFinished} explicitly. * <p>Note that this call runs synchronously, but typically the creator * of the task will call this method in a separate thread. */ public void run () { try { notifyRunning (); if (run != null) run.run (); } finally { notifyFinished (); } }
/** Start the task. * When it finishes (even with an exception) it calls * {@link #notifyFinished}. * Subclasses may override this method, but they * then need to call {@link #notifyFinished} explicitly. * <p>Note that this call runs synchronously, but typically the creator * of the task will call this method in a separate thread. */ public void run () { try { notifyRunning (); if (run != null) run.run (); } finally { notifyFinished (); } }
/** Start the task. * When it finishes (even with an exception) it calls * {@link #notifyFinished}. * Subclasses may override this method, but they * then need to call {@link #notifyFinished} explicitly. * <p>Note that this call runs synchronously, but typically the creator * of the task will call this method in a separate thread. */ public void run() { try { notifyRunning(); if (run != null) { run.run(); } } finally { notifyFinished(); } }