On Thu, 7 Oct 2004 01:11:01 -0700, Sivaraman.S wrote:
How can i do this. Is there any other way to do this?
Check out the QueueUserWorkItem in the docs. It lets you use the
threadpool to spin off threads. You don't need to create them yourself
necessarily.
Basically, your sub would have the following signature:
Shared Sub DoWork(stateInfo As Object)
'Code to execute here
End Sub
Then you kick off a thread like this:
ThreadPool.QueueUserWorkItem(AddressOf DoWork)
..Net manages the thread pool.
When you use this method, you don't have control of the threads. Plus, by
default, there is an application wide limit of 25 threads in the thread
pool.
HTH
--
Chris
dunawayc[AT]sbcglobal_lunchmeat_[DOT]net
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.