Replace isEmpty() with getPendingUnits().

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2616 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2009-08-18 23:38:42 +00:00
parent abbef6fab5
commit 1e530cd63d
+6 -6
View File
@@ -154,14 +154,14 @@ public class Invoker extends LoopingThread
} }
/** /**
* Returns true if this invoker has no pending units, false if it has pending units. * Returns the number of units waiting on the queue to be processed. <em>Note:</em> this does
* <em>Note:</em> this does not account for whether a unit is <em>currently</em> being * not account for whether a unit is <em>currently</em> being processed, so if you want to know
* processed, so if you want to guarantee that an invoker is empty, it's best to call this * definitively, for example that an invoker is empty, it's best to call this method in a unit
* method in a unit being processed by that invoker. * being processed by that invoker.
*/ */
public boolean isEmpty () public int getPendingUnits ()
{ {
return _queue.size() == 0; return _queue.size();
} }
// from RunQueue // from RunQueue