1 Reply Latest reply on Jun 10, 2005 10:50 AM by ben.wang

    Reduce frequency of calls to BoundedBuffer.size() in Region.



      I've opened up an issue in Jira to request a change to reduce the freqency of calls to BoundedBuffer.size() in Region.putNodeEvent().


      The problem is that BoundedBuffer.size() is not a cheap call - requires a lock acquisition - and since there is high contention for this object across threads, this leads to concurrency problems.

      I've attached an enhanced Region.java file that makes the call only once every 100 calls.