Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mark correct me

 
dhana sekar
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iam working with locking and unlocking i have the following doubts
1. I belive that there is no need to lock(wait) the first client-1 who try to book a ticket.
(but)
Concurrently if Client-2 try to book a ticket on the same record in this case i belive that the client-2 should be made to wait till the client-1
called the unlock(notify()).
2. Here if feel that the client-1 d'nt call the wait but the unlocking(notify()) is done by client-1.

Mark please correct me.
thanks
dhana
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why add code to try to determine if the client is the first client? If you have client-1 wait, it won't be more than a millisecond anyway. I wouldn't worry about it.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic