Simplify this, which was complexified so that it could avoid logging

when posted to a shutdown queue. There's a method we can override for that now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6013 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2010-01-06 20:18:11 +00:00
parent e571cd9e70
commit 4c009f7a5f
@@ -281,29 +281,18 @@ public class PresentsDObjectMgr
// from interface RootDObjectManager // from interface RootDObjectManager
public Interval newInterval (final Runnable action) public Interval newInterval (final Runnable action)
{ {
return new Interval() { return new Interval(this) {
@Override @Override public void expired () {
public void expired () { action.run();
if (isRunning()) {
postRunnable(new Runnable() {
public void run () {
// if we were canceled between the time that we posted this runnable
// and the time the dobjmgr got around to executing us, we opt not to
// actually execute our runnable because that's how Interval does it
if (_task != null) {
action.run();
}
}
});
} else {
cancel();
}
} }
@Override @Override public String toString () {
public String toString() {
return "DObjectManagerInterval(" + action + ")"; return "DObjectManagerInterval(" + action + ")";
} }
@Override protected void noteRejected () {
// don't complain
}
}; };
} }