cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/util ComponentPool.java
Date Mon, 26 Feb 2001 14:44:14 GMT
bloritsch    01/02/26 06:44:13

  Modified:    src/org/apache/cocoon/util Tag: xml-cocoon2
                        ComponentPool.java
  Log:
  Make the get and put methods synchronized to avoid the
  race conditions in AbstractPool.  Will update again later
  when there is something better.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.7   +2 -2      xml-cocoon/src/org/apache/cocoon/util/Attic/ComponentPool.java
  
  Index: ComponentPool.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/util/Attic/ComponentPool.java,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- ComponentPool.java	2001/02/20 20:34:21	1.1.2.6
  +++ ComponentPool.java	2001/02/26 14:44:11	1.1.2.7
  @@ -58,7 +58,7 @@
        *
        * @return an object from Pool
        */
  -    public final Poolable get() throws Exception {
  +    public synchronized final Poolable get() throws Exception {
           synchronized(m_pool) {
               Poolable component = super.get();
               log.debug(
  @@ -76,7 +76,7 @@
        *
        * @param poolable the object to be placed in pool
        */
  -    public final void put(final Poolable poolable) {
  +    public synchronized final void put(final Poolable poolable) {
           synchronized(m_pool) {
               super.put(poolable);
               log.debug(
  
  
  

Mime
View raw message