Hi,
I need to create thread dynamically depend on business rules.
Sometimes i need to create 2 threads, sometimes i need to create 3 threads.
For each thread it will read a set of data from database and all the data from the threads will be merged into 1 dataset.
My problem is how do i create the thread dynamically and having them to joiin and start and the same time
Unlike to create button dynamically where i can set the button.id="Unique id"
I fail to increase the variable mi which is part of the parameter tobe used.
Below is my coding,does anyone has any idea
Private mi As Integer = 0
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim i As Integer
Dim thread1 As Thread
For i = 0 To 1
thread1 = New Thread(New ThreadStart(AddressOf StartLoopLongProcess ...
Go to the complete details ...