Edited comments.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1557 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -108,7 +108,7 @@ public abstract class Interval
|
|||||||
*/
|
*/
|
||||||
protected final void safelyExpire (TimerTask task)
|
protected final void safelyExpire (TimerTask task)
|
||||||
{
|
{
|
||||||
// skip expiring the interval if the task is no longer valid
|
// only expire the interval if the task is still valid
|
||||||
if (_task == task) {
|
if (_task == task) {
|
||||||
try {
|
try {
|
||||||
expired();
|
expired();
|
||||||
@@ -125,6 +125,7 @@ public abstract class Interval
|
|||||||
protected class IntervalTask extends TimerTask
|
protected class IntervalTask extends TimerTask
|
||||||
implements Runnable
|
implements Runnable
|
||||||
{
|
{
|
||||||
|
// inherited from both TimerTask and Runnable
|
||||||
public void run () {
|
public void run () {
|
||||||
if (_runQueue == null || _runQueue.isDispatchThread()) {
|
if (_runQueue == null || _runQueue.isDispatchThread()) {
|
||||||
safelyExpire(this);
|
safelyExpire(this);
|
||||||
@@ -138,9 +139,7 @@ public abstract class Interval
|
|||||||
* Interval. */
|
* Interval. */
|
||||||
protected RunQueue _runQueue;
|
protected RunQueue _runQueue;
|
||||||
|
|
||||||
/** The task that actually schedules our execution with the static Timer.
|
/** The task that actually schedules our execution with the static Timer. */
|
||||||
* Also the object that we synchronize upon when dealing with those issues.
|
|
||||||
*/
|
|
||||||
protected volatile TimerTask _task;
|
protected volatile TimerTask _task;
|
||||||
|
|
||||||
/** The daemon timer used to schedule all Intervals. */
|
/** The daemon timer used to schedule all Intervals. */
|
||||||
|
|||||||
Reference in New Issue
Block a user