• Post Reply Bookmark Topic Watch Topic
  • New Topic

DataBase lock

Felipe Regalgo
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

when I will update the record I need to verify if nobody is reading or deleting it... the same as when I will delete a record: I need to verify if it is already in update request or read, so I calls the wait() method....

My question is:
When a client ask to read a record I need to verify if someone is locking this record in delete or updating request, if so I call wait method.... but if has someone reading this record too, I need to permit this two threads could read the record as the same time??? or make that only one thread can access record even if has only one thread reading and this new Thread wants to read to too, the second thread should wait the first finish read until starts???

I hope you have understand my question.... if i'm not clear you sayed me then I explain again....

my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!