B
blue
We have an abstract class with all static methods. It makes sense to have
it static because there are no member variables and the constructor is
empty.
Some of the methods update the SQL Server database and we were wondering if
there would be a problem if two threads called that method at the same time.
Would it corrupt the database?
I was thinking about locking the code on entry and unlocking it on exit.
My question is, would this work in an ASP.NET environment? Do the pages
access the same exact instance of the static classes? So, if User A
accesses the update code first and soon after, User B tries to access it,
User B will have to wait for A to unlock the code.
Thanks,
blue
it static because there are no member variables and the constructor is
empty.
Some of the methods update the SQL Server database and we were wondering if
there would be a problem if two threads called that method at the same time.
Would it corrupt the database?
I was thinking about locking the code on entry and unlocking it on exit.
My question is, would this work in an ASP.NET environment? Do the pages
access the same exact instance of the static classes? So, if User A
accesses the update code first and soon after, User B tries to access it,
User B will have to wait for A to unlock the code.
Thanks,
blue