- Регистрация
- 17.08.2012
- Сообщения
- 100
- Благодарностей
- 6
- Баллы
- 18
I have a template that creates accounts and places them in a text file
then I have a second template that uses thos accounts....
When I use the second template I like to do multithreading.... But I think I'm doing something wrong
to avoid using the same account twice by multiple threads, I first do a random pause of 1 to 20 seconds.... then I read the file and delete it, then take the first line in memory and immediately save the file again......
But when I create a lot of threads, (more than 10) ... sometimes it happens that my accounts.txt file dissapears and does not come back....
Any tips is appreciated or should I take a different approach?
Thank you,
then I have a second template that uses thos accounts....
When I use the second template I like to do multithreading.... But I think I'm doing something wrong
to avoid using the same account twice by multiple threads, I first do a random pause of 1 to 20 seconds.... then I read the file and delete it, then take the first line in memory and immediately save the file again......
But when I create a lot of threads, (more than 10) ... sometimes it happens that my accounts.txt file dissapears and does not come back....
Any tips is appreciated or should I take a different approach?
Thank you,