- Регистрация
- 29.03.2011
- Сообщения
- 221
- Благодарностей
- 30
- Баллы
- 0
With a template that runs on e.g. 40 threads, but they use the same resource files (e.g. accounts.txt) what do I have to do, to make sure, these threads don't mess with the file?
I know if two threads try to write to the same file, there's a file block for the second (and following thread).
Is it the same for reading? get files blocked on reading?
And if a step encounters a file block, it will fail. So I have to loop it to try again, right?
Can I wait less than a second (pause -1-) before looping?
I know if two threads try to write to the same file, there's a file block for the second (and following thread).
Is it the same for reading? get files blocked on reading?
And if a step encounters a file block, it will fail. So I have to loop it to try again, right?
Can I wait less than a second (pause -1-) before looping?