EDIT: I'm developing with .NET 3.5.
i've a Procedure that DoSomething. I've to launch it for X times. I would like to use thread .. but i want to use a maximum of 5 thread per time. So, i can write something like:
for i=0 to TimesToDo -1
Dim t as new Thread = new Thread(Addressof MyProcedure)
t.Start()
if TotalThread > 5 then Wait()
next i
Ok this is 'pseudo code'. Is it possible in .NET ? Some other questions are: how can i get the number of my thread running ? Is it possible to get the 'signal' of ending thread ?
Thanks