• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Locking/ Synchronization

 
Dilip kumar
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I�m using vector to hold all the locked records.
I�m wondering whether I should synchronize the lock and unlock methods. My concern is user B has to wait until user A completes lock method though user B is locking different record.
I really appreciate any suggestions.
Thanks
 
Douglas Kent
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would steer away from having user B wait until user A is finished with a different record.
 
Tom Peillon
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you holding the locked records in a vector, isn't
a better approach to synchronize on the row objects themselves?
Won't you have a problem that if a user locks a record and then gets disconnected due to a network problem, the row won't get
removed from the vector?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic