473,386 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Changing thread priority on specific page

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
2 1799
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Trev Hunter | last post by:
Hi All, I was just wondering if it is safe to change thread priorities with thread pool threads (threads used by System.Threading.Timer and those used by the ThreadPool class itself). Say I...
31
by: AlexeiOst | last post by:
Everywhere in documentation there are recommendations to use threads from thread pooling for relatively short tasks. As I understand, fetching a page or multiple pages (sometimes up to 50 but not...
2
by: Martin Baker | last post by:
I have an activeX control which I am calling from a C# program, this works fine. I now want to call the activeX control from a seperate thread, this works but is very slow. This is far too slow...
4
by: Matthew Groch | last post by:
Hi all, I've got a server that handles a relatively high number of concurrent transactions (on the magnitude of 1000's per second). Client applications establish socket connections with the...
5
by: pb | last post by:
Do anyone know how to change the .aspx extension to something else, say ..sssx, for all or part of a ASP.NET 2.0 site? I recall a Microsoft article on this some time ago, but I cannot locate it.
0
by: roni schuetz | last post by:
since a few day's i'm running around the problem that I stocked with a change i need to do. hopefully somebody here can give me a tipp which will be usefull to solve my problem. I'm using a...
9
by: John den Haan | last post by:
Hey! This question may be basic for you guys, but I haven't found anything related to it in the FAQ. How do I make sure a simple while(1){} loop (for example) doesn't consume half my CPU? ...
3
by: John Nagle | last post by:
There's no way to set thread priorities within Python, is there? We have some threads that go compute-bound, and would like to reduce their priority slightly so the other operations, like...
8
by: Joe Withawk | last post by:
I have an application in which there exist a thread that handles directx rendering. It runs on a dual core system with windows vista and xp. It is set to have highest priority and simply loops with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.