-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: VishalRJoshi
Message 39 in Discussion
Quick MultiThreading
This is some real quick good info for specific scenarios... If you
are writing some workflow logic of yours and in-between you realize that you
want to perform some tasks which would be time consuming but actually are
also apart from your actual business logic and so you would not want your
business logic to waste on performance by waiting for those tasks to
complete... Some of the examples of such tasks would be printing, cleaning
back-end, doing logging or tracing functionality etc...
Well this is when the System.Threading.ThreadPool class comes real
handy... There is a static method called QueueUserWorkItem... You can call
this method with the method that you want to execute Asynchronously... The
Threadpool will use the first available thread to process your request...
Now your main business logic does not need to wait for this function to
finish...
Now this function can as well give a call back but then it depends
upon your requirements...
Read more about it on MSDN...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemthreadingthreadpoolclasstopic.asp
Vishal Joshi
Microsoft MVP .Net
If You Think YOU CAN... You Can...
http://VishalJoshi.Blogspot.com
http://www.microsoft.com/india/mvp/indiamvp.aspx
http://groups.msn.com/ChennaiNetUserGroup
http://groups.msn.com/CNUG-DAM
http://groups.msn.com/NetBloomingtonUserGroup
PS: This tip is a result of my discussions with Matt, a colleague of mine...
We often discuss interesting technical stuff in our "Leisure At Work" (LAW
can never be illegal right!!)
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]