Hello,
I need help making my global variables thread safe. I will be creating threads, with a regular
Thread object using a for loop, which grabs the amount of threads from a numericUpDownValue
on the interface. Each thread will grab variables as follows username, proxy, useragent, failedLogin:
user@localhost:password431 , [login to view URL], Mozilla , 0
I have a couple of conditions where if a username fails to login to webmail,
it should be added to a public List DeadAccounts and written to a text file.
So, one of the scenarios that will be reached during the thread process,
is when when the threads outNumber the amount of available accounts.
So, maybe something like this
{
thead+= -1;
}
Will be suitable, where we kill one of the threads in a safe way.
I do not want to use complicated tasks using backgroundworker and asynchronous events.
I just want this to be simply thread safe, I hope you understand the task at hand.
Thanks,
John