I'm not sure you are using the term re-entrant appropriately I suspect you
mean is it threadsafe. The answer is: its up to you.
Normally classes that you may place in app_code that are then instanced by
ASPX pages will be threadsafe in that they are only being used by one thread
for the duration of the current request processing. However if you then
place instances such classes somewhere that can be accessed by more than one
thread (cache, static member etc) the responsibility for creating thread
safety is yours.
I'm not sure you are using the term re-entrant appropriately I suspect you
mean is it threadsafe. The answer is: its up to you.
Normally classes that you may place in app_code that are then instanced by
ASPX pages will be threadsafe in that they are only being used by one thread
for the duration of the current request processing. However if you then
place instances such classes somewhere that can be accessed by more than one
thread (cache, static member etc) the responsibility for creating thread
safety is yours.
Static variables will be available across the whole app domain. It is
conceivable that two clients hitting the same page at the same time would
have two threads trying to modify that variable at the same time.
You will need to add some synchronising code such as:-
Static variables will be available across the whole app domain. It is
conceivable that two clients hitting the same page at the same time would
have two threads trying to modify that variable at the same time.
You will need to add some synchronising code such as:-
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.