Two Projects Reading/Writing Same Txt at the Same Time

  • Автор темы Автор темы Cyrix
  • Дата начала Дата начала

Cyrix

Client
Регистрация
16.12.2011
Сообщения
401
Реакции
12
Баллы
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?
 
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.
 
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.
 
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.
 
Yes, I would like the examples. Could you please?
 

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