R
richard.hallgren
Hi,
I have a static method that I use for data access. This particular
method reads x number of rows and then updates these rows with a read
= 1 flag. I access this method with several threads and I guess that
one thread (thread A) could read rows and then the next thread (thread
B) would read the same rows BEFORE the first thread has updated
"it's" (all the rows selected by thread A) rows as read - right? Will
it help just wrapping this complete method (the one that read and then
updates the rows as read) in a lock or is that unnecessary in this
case?
I have a static method that I use for data access. This particular
method reads x number of rows and then updates these rows with a read
= 1 flag. I access this method with several threads and I guess that
one thread (thread A) could read rows and then the next thread (thread
B) would read the same rows BEFORE the first thread has updated
"it's" (all the rows selected by thread A) rows as read - right? Will
it help just wrapping this complete method (the one that read and then
updates the rows as read) in a lock or is that unnecessary in this
case?