- Регистрация
- 16.09.2011
- Сообщения
- 365
- Благодарностей
- 10
- Баллы
- 18
I have c# setup using global variable on a counter to take line form subsequent lines of an accounts file.
It works when i run the poster on one thread, then manually add another thread after a certain time.
But when I setup 2 threads to run right away for some reason it takes the same data form line zero each time and ignores the wait funciton i have in place in the template.
I set it up so that there is a logic check for whether the global var is initilised or not. If not then no wait but if initialized then it should wait 5 seconds before starting. But it doesnt do that and runs both threads exactly in sequence.
Why might it be doing this? I want a pause before running each thread so that it will only start the next one once the lines have been taken/written for the first.
I want ot have it so that if i have ten accounts in my accounts file i can just put 10 into execution count and itll use only that one template to run the 10 threads with different accounts.
It works when i run the poster on one thread, then manually add another thread after a certain time.
But when I setup 2 threads to run right away for some reason it takes the same data form line zero each time and ignores the wait funciton i have in place in the template.
I set it up so that there is a logic check for whether the global var is initilised or not. If not then no wait but if initialized then it should wait 5 seconds before starting. But it doesnt do that and runs both threads exactly in sequence.
Why might it be doing this? I want a pause before running each thread so that it will only start the next one once the lines have been taken/written for the first.
I want ot have it so that if i have ten accounts in my accounts file i can just put 10 into execution count and itll use only that one template to run the 10 threads with different accounts.