I've been learning more and more about threading and multi-threading in VB. I wrote this code below:
However, lets say the threads do something infinite; a loop maybe. How do I kill all threads in the threadpool?
I've searched around but I didn't manage to find a clean solution.
Code
Dim max As Integer = NumericalUpDown1.Value - 1
For X As Integer = 0 To max
System.Threading.ThreadPool.QueueUserWorkItem(Sub() myTHREAD())
NextHowever, lets say the threads do something infinite; a loop maybe. How do I kill all threads in the threadpool?
I've searched around but I didn't manage to find a clean solution.


