Changeset 31671

Show
Ignore:
Timestamp:
10.05.2017 18:37:06 (2 years ago)
Author:
ak19
Message:

Additional comment

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/build/CollectionConstructor.java

    r31669 r31671  
    9999    } 
    100100 
     101    // We never call removeListener. If we do start calling removeListener() change the listeners list 
     102    // over to type ConcurrentLinkedQueue, for reasons explained at 
     103    // http://stackoverflow.com/questions/8259479/should-i-synchronize-listener-notifications-or-not 
     104    // The current listeners list type is CopyOnWriteArrayList, which provides thread safety. But it 
     105    // can still send off events to listeners just as they're being unregistered, and that could be a 
     106    // problem if we were specifically removing the listener because we wanted to cease it from 
     107    // listening and responding to subsequent events. 
    101108    public boolean removeListener(ConstructionListener listener) 
    102109    {