/[storm]/storm/org/nongnu/storm/impl/AsyncSetCollector.java
ViewVC logotype

Diff of /storm/org/nongnu/storm/impl/AsyncSetCollector.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by benja, Tue Apr 22 13:01:21 2003 UTC revision 1.7 by benja, Fri Apr 25 10:53:56 2003 UTC
# Line 152  public class AsyncSetCollector implement Line 152  public class AsyncSetCollector implement
152                  public boolean hasNext() {                  public boolean hasNext() {
153                      if(!queue.isEmpty())                      if(!queue.isEmpty())
154                          return true;                          return true;
155                        else if(isFinished())
156                            return false;
157    
158                      synchronized(queue) {                      synchronized(queue) {
159                          try {                          try {
160                              queue.wait();                              queue.wait();
# Line 160  public class AsyncSetCollector implement Line 163  public class AsyncSetCollector implement
163                      return !queue.isEmpty();                      return !queue.isEmpty();
164                  }                  }
165                  public Object next() {                  public Object next() {
166                      if(!queue.isEmpty()) {                      if(!queue.isEmpty())
167                          return queue.remove(0);                          return queue.remove(0);
168                      }                      else if(isFinished())
169                            throw NoSuchElementException();
170    
171                      synchronized(queue) {                      synchronized(queue) {
172                          try {                          try {
173                              queue.wait();                              queue.wait();

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26