avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hawkes" <jhaw...@adsnm.com>
Subject Re: [RT] Notification pattern has interesting effects on IoC
Date Thu, 26 Feb 2004 17:35:59 GMT
> Otherwise you can get:
> 
>  public void addMyListener( MyListener listener )
>  {
>      synchronized( m_Listeners )
>      {
>          ArrayList clone = (ArrayList) m_Listeners.clone();
>          m_Listeners = clone;
>          clone.add( listener );
>      }
>  }
> 
> Due to out-of-order-execution.
> 
> util.concurrent has a CopyOnWriteArrayList, BTW, so
> there's no need to implement this yourself...
> 
> /LS

java.util.concurrent is in 1.5
a LOT of concurrency improvements are in 1.5

Unfortunately, I am stuck using 1.3 for the time being.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message