More newbie questions:
This code grabs a number of proxies from the list in the main window (I couldn\'t figure out how to make variables be available between diffe
One problem with your code is that you're calling FinishedProxies.Add
from multiple threads concurrently. That's going to cause a problem because List
isn't thread-safe. You'll need to protect it with a lock or some other synchronization primitive, or use a concurrent collection.
Whether that causes the UI lockup, I don't know. Without more information, it's hard to say. If the proxies
list is very long and checkProxy
doesn't take long to execute, then your tasks will all queue up behind that Invoke
call. That's going to cause a whole bunch of pending UI updates. That will lock up the UI because the UI thread is busy servicing those queued requests.