• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Am I on the right track?

 
sam cen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had been thinking about lock/unlock implementation. I think for each client
should keep its own lock, and as the client follow the operation sequence as
lock, read, modify, unlock. I just thinking can we just keep only one lock for each client.
The reason is the client will unlock the record immediately after it finished the modification.
Am I on the right track?
Thanks much,
Sam
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I think for each client should keep its own lock

.. and how would the other client know that a particular record is locked?
Eugene.
 
sam cen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
provide another container to keep all the locks,
and it is shared by all client.
sam
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are on the right track, but, is it possible to repace the lock container with a simple array?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic