> Does each instance of an aspx page spawn its own thread?
ASP.NET dispatches pool threads as the load of requests increase.
(Process ASPNET_WP.EXE).
Generally there's a maximum pool size so a page doesn't always spawn a
new thread.
A page is processed by a worker thread that may already have been
launched before (that is called thread pooling).
I assume each aspx page is processed in a synchronized
method
A page is totally processed by only one thread.
So the question is no use.
If an aspx page has a class that requires lengthly processing are
all other instances of the page queued
With IIS sure and fortunately ! Again that is thread pooling that
enables parallelizing page processing.
With personal WebServer not sure.
If more than one aspx page uses the
modFoo class (simple sample before) would I be headed for trouble?
public class modFoo
{
public static Int32 lClient = 0;
public modFoo()
{
}
}
If each page instantiate a modFoo object, there'll be multiple threads
that will share IClient member so'll have to synchronize access to it.
If you want each thread have it's own copy of IClient, you should write
:
[ThreadStaticAttribute]
public static Int32 lClient = 0;
But it might not be what you want.