Threads and Web Apps

Is my understanding accurate that each WebSession instance and each HandleSpecialURL event get their own thread? If so, what is their Thread.Priority relative to the main thread?

Do any other objects/classes/instances (other than WebApplication) or events get their own thread?

I don’t think they have a special priority, just the default.

Just checked it. Priority is 5. And each time a request is handled, it seems like we have a new thread, so they are not recycled.

Are you referring to WebSession instances, HandleSpecialURL events or both?

Are you aware of any other objects/classes/instances (other than WebApplication) or events that get their own thread?

I believe HandleSpecialURL events are executed on the main thread.

I would be very surprised if any user request is run on the main thread as it would become a bottle neck very quickly.

Testing on 4.1 it seems that HandleSpecialURL does not use the main thread. I thought that it used to, but I could be mistaken.

every handling of a HTTP Request is performed on a thread. But still any thread can block the whole system, so be careful on what you do.

Thanks Christian, Daniel and James!