Hey guys,

 

ExecutorThreadModel#getInstance(String) is blocking the entire Map. I
would suggest reducing the area being blocked by synchronizing on the
serviceName instead. So the change would be:

 

        synchronized( service2model )

 

would look like:

 

        synchronized( serviceName.intern() )

 

I'm still reading and learning MINA so don't know which other places
could use the same optimization. Oh, if you are going to go with the
syn'ing on Strings then the Map will have to be a ConcurrentHashMap.

 

Regards,

 

  -- Gato

 

PS: I'm using branch 1.1. Haven't verified trunk.

Reply via email to