|
From: APA on 3 Jul 2008 01:44 When set to true does this prevent multiple threads from processing this handler simultaneously,i.e. one thread must wait for the completion of the current thread executing the class before it executes the class? So, if I have 20 requests for this particular handler does each one have to wait it's turn to execute the class? If IsReusable is set ot fto alse what is the trade-off (aside from not having to worry about blocking of stepping on the toes of others executing the same code).
From: Anthony Jones on 3 Jul 2008 08:39 "APA" <buddy__a(a)hotmail.com> wrote in message news:uvjCg$M3IHA.2524(a)TK2MSFTNGP04.phx.gbl... > When set to true does this prevent multiple threads from processing this handler simultaneously,i.e. one thread must wait for the completion of the > current thread executing the class before it executes the class? So, if I have 20 requests for this particular handler does each one have to wait > it's turn to execute the class? > > If IsReusable is set ot fto alse what is the trade-off (aside from not having to worry about blocking of stepping on the toes of others executing the > same code). > > IsReusable will causes ASP.NET to pool instances of the handler. Only one thread will use an instance at any one time. If more than one thread requires an instance further instances are created. Its up to you to make sure that any instance level state left in a tidy state before the end the ProcessRequest method. It is only useful if some instance level state is expensive to create and is always the same when a new instance is created. When ProcessRequest ends the instance is returned to a pool rather than handed over for GCing. ASP.NET will reuse existing instances waiting in the pool before creating additional instances. -- Anthony Jones - MVP ASP/ASP.NET
|
Pages: 1 Prev: Need help with Gridview column width. Next: Imagemap with no image |