I have two program one in c# that write to store file and python program that read from the same file this program must run together, how can I do it? And what the type of file I used to store?
Asked
Active
Viewed 219 times
-1
-
welcome to stackoverflow. i recommend [taking the tour](https://stackoverflow.com/tour), as well as reading [how to ask a good question](https://stackoverflow.com/help/how-to-ask) and [what's on topic](https://stackoverflow.com/help/on-topic). – Franz Gleichmann Feb 05 '22 at 09:30
-
@FranzGleichmann what kind of additional information you think is needed? Writing and reading at the same time from same/different processes is perfectly valid operation and I don't see what other info is needed. Obviously question falls into "no research shown" category, but claiming that it is not on-topic is not correct to my understanding. – Alexei Levenkov Feb 05 '22 at 09:34
-
@AlexeiLevenkov the "additional information needed" for a good question is: what has been tried/researched so far, and what exactly the _problem_ is. plus: what OP wants to _achieve_ by this - i'd bet there's a better solution than simultaneously accessing a file. as for the link to what's on topic - IMHO it _should_ be required reading for anyone who apparently hasn't read _any_ of SO's help pages yet. – Franz Gleichmann Feb 05 '22 at 09:52
1 Answers
-1
It seems like a mutual exclusion problem.
You can create every type of file you want but you should ensure that the writings happen in a correct way.
In order to synchronize the processes you can use a shared semaphore between the python process and c# process, also a shared memory or system event should be fine.
If you are on a unix system you can check this for python

Daniele Affinita
- 148
- 11