• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

Hello again,

i was looking over BlockingCache (rev1.2 in cvs) and i saw the HashMap ‘locks’, which contains the Mutex objects for locking single entries from the backing cache.

I just wonder, when the backing cache is an LRUMap and an old element is falling out, why this removal isnt reflected to the corresponding Mutex object in ‘locks.

Does this mean, ‘locks’ will grow forever?

Even when no object is contained in the backing cache anymore, ‘locks’ will still contain earlier created Mutex objects?

If this is not wanted, would a simple locks.remove(key) help, if put(key,null) has been called? Maybe not, since threads might wait on that Mutex object, that is being removed in put. One gets the permission to enter after the Mutex has been removed from ‘locks’, because its been released. But the thread, that entered, cant release this Mutex object later anymore, since on a put(key,newValue) its also a new Mutex object.

Mh. Old discussion?

Sourceforge Ticket ID: 1190614 - Opened By: knigge - 26 Apr 2005 22:51 UTC

Comments

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira