Ask a Question related to ASP.NET General, Design and Development.
-
bruce barker #1
Re: ThreadStaticAttribute and threadpool
a thread static will live the life of the thread. in asp.net, you are right,
there is a thread pool, with a min and max, so the life of a thread is hard
to predict. also asp.net plays fast and loose with its thread management, so
that there is no guarantee that the same thread is used for all of a page
processing. you can set aspcomat to true to force only one thread a page
request. you may want to context storage instead (say use application cache
which is context based) .
thread statics are only intialized once, so when the thread is pulled from
pool, the static will have the last value saved it in, so, you need to init
it every time.
-- bruce (sqlwork.com)
"Calvin" <szguoxz@hotmail.com> wrote in message
news:02c701c347dd$c49cc9e0$a301280a@phx.gbl...> I assume every request is using a different thread, am I
> right?
>
> If a request is retriving a thread from a threadpool
> instead of creating a new thread (is this the case in
> IIS), what will happen to thread static variable?
> [threadstatic].
>
> I have applications depending on thread variable, I am not
> sure those thread static variable is resetted or not. And
> it's hard to test!
>
> Anyone has some inside knowlodge of this?
>
> Thanks,
>
> Calvin
bruce barker Guest
-
CF7 Hanging; Memory &/orjrunx.scheduler.ThreadPool$Throttle
We have Solaris 9 (current patchset) w/ CF7 standalone and Oracle9 on another server. We run on multiple servers and recently several servers... -
Change Max number of thread in threadpool
Hi, Is it possible to set the max number of thread a Threadpool can handle in code ? thks -
Impersonate in ThreadPool
Hi all I have an ASP.NET application that uses impersonate account to connect to DB, this works good. But in some cases I need to put some methods... -
Not enough free threads in the ThreadPool
I am getting this error on a request to a webservice after a long running one completes. Does this make sense to anybody? Of course it doesn't... -
Method not found: Void System.Threading.ThreadPool.GetMinThreads
I have just installed Windows Server 2003 as an upgrade and now get the following message when I run ASP.NET pages (ASP pages run fine): Method... -
David Browne #2
Re: ThreadStaticAttribute and threadpool
"Calvin" <szguoxz@hotmail.com> wrote in message
news:02c701c347dd$c49cc9e0$a301280a@phx.gbl...I think you might want to store your data in the Session,> I assume every request is using a different thread, am I
> right?
>
> If a request is retriving a thread from a threadpool
> instead of creating a new thread (is this the case in
> IIS), what will happen to thread static variable?
> [threadstatic].
>
> I have applications depending on thread variable, I am not
> sure those thread static variable is resetted or not. And
> it's hard to test!
>
> Anyone has some inside knowlodge of this?
>
instead of in a ThreadStatic variable.
David
David Browne Guest



Reply With Quote

