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:
@@ -281,29 +281,18 @@ public class PresentsDObjectMgr
|
||||
// from interface RootDObjectManager
|
||||
public Interval newInterval (final Runnable action)
|
||||
{
|
||||
return new Interval() {
|
||||
@Override
|
||||
public void expired () {
|
||||
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();
|
||||
}
|
||||
return new Interval(this) {
|
||||
@Override public void expired () {
|
||||
action.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@Override public String toString () {
|
||||
return "DObjectManagerInterval(" + action + ")";
|
||||
}
|
||||
|
||||
@Override protected void noteRejected () {
|
||||
// don't complain
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user