Menu

#175 Access to _cache should be "synchronized" in file connector

open
5
2005-10-24
2005-10-24
Vincent G.
No

Access to "_cache" class member should be
"synchronized" in "DataManager" of file connector.

For instance, in the flush() method, you should add
"synchronized (_cache) {...}", just like you did it for
"_access" in the same file.

Just the same for "write_entry", "read_entry",
"invalidate", "free_all" methods and every methods
which uses "_cache".

You should also ensure, you get the "_cache" lock
before "_access" lock.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB