By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,795 Members | 1,761 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,795 IT Pros & Developers. It's quick & easy.

Changing thread priority on specific page

P: n/a
I have a few web pages that do file crunching; I want to make sure these
pages...only these pages, run at a lower priority.

I'm not sure of how the threading architecture of ASP.NET works, but is it
as easy as just doing a SetPriority on the current thread?

I just want to make sure if I change the thread priority, that it doesn't
change the priority for all of my web site.

Amil
Mar 21 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
yes and no. asp.net uses thread agility for performance. this means it can
switch threads during processing a request. do not set priority on page
load, and set back onload, as they may not be the same thread.

also while processing the request, i/o threads are tied up, so delaying page
processing, can backup this threads. asp.net treads are a critical resource,
you shoudl not tie them up. if you have a long processing request, you
should use a background thread with a queue, return right away. then have
the client poll for completion.

-- bruce (sqlwork.com)
"Amil" <am********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I have a few web pages that do file crunching; I want to make sure these
pages...only these pages, run at a lower priority.

I'm not sure of how the threading architecture of ASP.NET works, but is it
as easy as just doing a SetPriority on the current thread?

I just want to make sure if I change the thread priority, that it doesn't
change the priority for all of my web site.

Amil

Mar 21 '06 #2

P: n/a
Yes, I see your point about delaying being bad. I actually have some other
code that follows the separate thread model you describe with the user
clicking to check status.

Thanks for the help.

Amil

"Bruce Barker" <br******************@safeco.com> wrote in message
news:eG**************@TK2MSFTNGP14.phx.gbl...
yes and no. asp.net uses thread agility for performance. this means it can
switch threads during processing a request. do not set priority on page
load, and set back onload, as they may not be the same thread.

also while processing the request, i/o threads are tied up, so delaying
page processing, can backup this threads. asp.net treads are a critical
resource, you shoudl not tie them up. if you have a long processing
request, you should use a background thread with a queue, return right
away. then have the client poll for completion.

-- bruce (sqlwork.com)
"Amil" <am********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I have a few web pages that do file crunching; I want to make sure these
pages...only these pages, run at a lower priority.

I'm not sure of how the threading architecture of ASP.NET works, but is
it as easy as just doing a SetPriority on the current thread?

I just want to make sure if I change the thread priority, that it doesn't
change the priority for all of my web site.

Amil


Mar 21 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.