Changing thread priority on specific page

  • Thread starter Thread starter Amil
  • Start date Start date
A

Amil

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
 
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)
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top