Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Threadpool in .NET

Status
Not open for further replies.

highwingers

Programmer
Jan 29, 2004
15
US
So I heard .NET has 25 threadPools available?

my question is, how do they work?

I believe Server/IIS maintain these threads?

now lets say i have 40 users on my site where I have BeginInvoke to run a worker thread. what will happen? are these 25 are shared globally or by PER user?

And whats the advantage in creating a new Thread Vs creating a worker thread using BeginInvoke.
 
you shouldn't need to create threads in an asp.net enviornment. use the http context as a unit of work boundary. it's much cleaner. and automatically managed by asp.net

if you insist on spinning up threads off the context then use the ThreadPool.QueueUserWorkItem().

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
I was under this impression Delegate.BeginInvoke runs a Thread from ThreadPool (Managed by Asp.net), and it does all the work in the background for us.

Am I wrong on this?
 
i haven't used that to spin up new threads. asp.net manages http requests. underneath the current context are thread(s). but from a web developers point of view, this is all but irrelevant.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
ThreadPool.QueueUserWorkItem() is basicly same as Delegate.BeginInvole.

Can you share your Best Example's alternate to Threading?

Thanks
 
what is the context for a "best" example. the termed is loaded in the developer community (best practices, best patterns, best _____).

if you want an asynchronous model for a web based application you would want to look into ajax for client communications and one-way messaging to push long running processes offline.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top