Ok. So I'm trying to use the task stuff to do parallel programming. I can't figure out how to update a gui label from a task.
I have Downloads class with method DownloadPatientData(V as Vendor) Vendor is a class to hold data.
in main form I have:
While VendorQueue.Count > 0
Dim v As Vendor = Nothing
If VendorQueue.TryDequeue(v) = True Then
threadCount += 1
Console.WriteLine("Processing Org " & v.Org)
v.DrFirstVersion = DrFirstVersion
Dim d As New Downloads
d.ThreadName = "t" & CStr(threadCount)
Dim t As Task = Task.Factory.StartNew(Sub() d.DownloadPatientData(v))
So over in the DownloadPatientData method how can I write back to the gui label (lblStatus)?
In regular threading you could add a event handler. What do you do here?