Touch of modernization
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@561 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -44,15 +44,14 @@ public class SceneBlockResolver extends LoopingThread
|
|||||||
*/
|
*/
|
||||||
public void resolveBlock (SceneBlock block, boolean hipri)
|
public void resolveBlock (SceneBlock block, boolean hipri)
|
||||||
{
|
{
|
||||||
log.debug("Queueing block for resolution " + block +
|
log.debug("Queueing block for resolution", "block", block, "hipri", hipri);
|
||||||
" (" + hipri + ").");
|
|
||||||
if (hipri) {
|
if (hipri) {
|
||||||
_queue.prepend(block);
|
_queue.prepend(block);
|
||||||
} else {
|
} else {
|
||||||
_queue.append(block);
|
_queue.append(block);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Temporarily suspends the scene block resolution thread.
|
* Temporarily suspends the scene block resolution thread.
|
||||||
*/
|
*/
|
||||||
@@ -79,10 +78,10 @@ public class SceneBlockResolver extends LoopingThread
|
|||||||
return _queue.size();
|
return _queue.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
// documentation inherited
|
@Override
|
||||||
public void iterate ()
|
public void iterate ()
|
||||||
{
|
{
|
||||||
final SceneBlock block = (SceneBlock)_queue.get();
|
final SceneBlock block = _queue.get();
|
||||||
|
|
||||||
while (!_resolving) {
|
while (!_resolving) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
@@ -116,10 +115,9 @@ public class SceneBlockResolver extends LoopingThread
|
|||||||
// let the block's panel know that it is resolved
|
// let the block's panel know that it is resolved
|
||||||
block.wasResolved();
|
block.wasResolved();
|
||||||
// report statistics
|
// report statistics
|
||||||
// if (report) {
|
// if (report) {
|
||||||
// Log.info("Resolution histogram " +
|
// log.info("Resolution histogram " + _histo.summarize() + ".");
|
||||||
// _histo.summarize() + ".");
|
// }
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -129,7 +127,7 @@ public class SceneBlockResolver extends LoopingThread
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** The invoker's queue of units to be executed. */
|
/** The invoker's queue of units to be executed. */
|
||||||
protected Queue _queue = new Queue();
|
protected Queue<SceneBlock> _queue = new Queue<SceneBlock>();
|
||||||
|
|
||||||
/** Indicates whether or not we are resolving or suspended. */
|
/** Indicates whether or not we are resolving or suspended. */
|
||||||
protected boolean _resolving = true;
|
protected boolean _resolving = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user