Two Projects Reading/Writing Same Txt at the Same Time

Cyrix

Client
Регистрация
16.12.2011
Сообщения
390
Благодарностей
11
Баллы
18
If I run two project A and B at the same time using lists loaded from same txt file and both have "Save to Change to File" checked, what will happen when project A writes to its list A?
Will project B know and change its list B as well?
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
Everything is loaded into memory so the two threads will work on the operations and when needed the files will be updated. Don't sweat the little things. If you are using a text file with multiple threads, everything will work as you expect it to.
 

Cyrix

Client
Регистрация
16.12.2011
Сообщения
390
Благодарностей
11
Баллы
18
Everything is loaded into memory so the two threads will work on the operations and when needed the files will be updated. Don't sweat the little things. If you are using a text file with multiple threads, everything will work as you expect it to.
Thanks for your reply but my question is about multiple projects R/Wing the same file rather than multiple threads of the same project R/Wing the same file.

Would this change your view, or it doesn't matter either?

Thanks.
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
Doesn't matter. It would be a good idea if you are dealing with larger files to use c# and lock the inputs and outputs. Especially when reading and writing both to the same file. It's not hard to do and if you need examples I can shoot them your way.
 

Cyrix

Client
Регистрация
16.12.2011
Сообщения
390
Благодарностей
11
Баллы
18
Yes, I would like the examples. Could you please?
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)