locks berkeley db -
02-23-2006
, 06:37 AM
hi!
i may have multiple threads reading or writing to a berkely db, i am
not using transactions. I wanted to synchronize these accesses. i am
using java btw, so i thought about using synchronized blocks for
database.get and database.put, but i dont know what i object should i
synchronize on. one option was the db name ( i might be accessing more
than one db at a time as well, so there will be multiple db's open with
read/write happening in all of them ).
sorry, if it seems like a stupid question, but this is the first time i
am using databases. any suggestions would be welcome
thanks |