M
Mr Newbie
I'm still thinking around this subject, and I find myself unsure about a
couple of things.
When a new users launches an ASP.NET application, this must be on a new
thread. When it encounters a shared member in a class, unless you are
setting static variables presumably when you instantiate an local object in
that shared member function the system maintains a local copy of that object
per thread ( is this right ? ).
To perhaps make my point more clearly. In a shared member function, If I
have a shared member which declares a variable a of type Integer. the actual
storage of this integer I assume would be on the users one thread and cannot
be confused with anyone slses (UNLESS) the variable is static as pointed out
by Jay.
The reason this is making me paranoid is that I want to make extensive used
of shared functions in my data layer to reduce code bloat and constant
instantiation.
Does anyone see any issues with this. Cor's example in the earlier post
related to a dataset does not seem right to me as he says that the dataset
would be overwritten, I cant see how this can be right. I decided to re-do
this posting thread to start afresh, I hope no one minds.
Sorry for being a little paranoid here, but i dont want to embark upon loads
of work and then find out Im screwed!
couple of things.
When a new users launches an ASP.NET application, this must be on a new
thread. When it encounters a shared member in a class, unless you are
setting static variables presumably when you instantiate an local object in
that shared member function the system maintains a local copy of that object
per thread ( is this right ? ).
To perhaps make my point more clearly. In a shared member function, If I
have a shared member which declares a variable a of type Integer. the actual
storage of this integer I assume would be on the users one thread and cannot
be confused with anyone slses (UNLESS) the variable is static as pointed out
by Jay.
The reason this is making me paranoid is that I want to make extensive used
of shared functions in my data layer to reduce code bloat and constant
instantiation.
Does anyone see any issues with this. Cor's example in the earlier post
related to a dataset does not seem right to me as he says that the dataset
would be overwritten, I cant see how this can be right. I decided to re-do
this posting thread to start afresh, I hope no one minds.
Sorry for being a little paranoid here, but i dont want to embark upon loads
of work and then find out Im screwed!