/[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.9 by benja, Fri May 2 13:28:38 2003 UTC revision 1.10 by benja, Fri May 9 10:54:56 2003 UTC
# Line 58  public class AsyncSetCollector implement Line 58  public class AsyncSetCollector implement
58          if(state != 0)          if(state != 0)
59              throw new IllegalStateException("Cannot receive more elements");              throw new IllegalStateException("Cannot receive more elements");
60                    
61          set.add(o);          synchronized(set) {
62                set.add(o);
63            }
64    
65          for(Iterator i=listeners.iterator(); i.hasNext();) {          for(Iterator i=listeners.iterator(); i.hasNext();) {
66              CollectionListener l = (CollectionListener)i.next();              CollectionListener l = (CollectionListener)i.next();
# Line 113  public class AsyncSetCollector implement Line 115  public class AsyncSetCollector implement
115          listeners.add(l);          listeners.add(l);
116          synchronized(set) {          synchronized(set) {
117              for(Iterator i=set.iterator(); i.hasNext();) {              for(Iterator i=set.iterator(); i.hasNext();) {
118                  if(l.item(i.next())) return;                  if(!l.item(i.next())) return;
119              }              }
120          }          }
121      }      }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

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