Public done As New List(Of String)
Public thinkingofdoing As New List(Of String)
Public todo As New List(Of String)
done.AddRange(System.IO.File.ReadAllLines("C:\Users\Work\Desktop\done.txt"))
thinkingofdoing.AddRange(System.IO.File.ReadAllLines("C:\Users\Work\Desktop\thinkingofdoing.txt"))
For i = 0 To thinkingofdoing.Count - 1
ThreadPool.QueueUserWorkItem(AddressOf caldiff, thinkingofdoing(i))
Next
Public Sub caldiff(ByVal tobedone)
If done.Contains(tobedone) = False Then
todo.Add(tobedone)
End If
End Sub
done.txt和thinkingofdoing.txt有 500 万到 800 万行
这需要很长时间 :(,即使四核 AMD 965 超频到 4.2 GHZ。