Public Sub create_threads() Dim Threads As New List(Of Thread) Dim x As Long Dim newthread As String x = Temptable.Rows.Count / Environment.ProcessorCount x = Math.Ceiling(x) For total = 0 To Environment.ProcessorCount - 1 I3 = x * total I4 = x * (total + 1) newthread = "thread" + total.ToString Dim t As New Thread(Sub() Match_Merge()) t.Name = newthread Threads.Add(t) t.Start() Next For Each t As Thread In Threads t.Join() Next End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)