Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master and Slave robot opening the file at the same time #5

Open
JW2145 opened this issue Oct 24, 2021 · 1 comment
Open

Master and Slave robot opening the file at the same time #5

JW2145 opened this issue Oct 24, 2021 · 1 comment

Comments

@JW2145
Copy link

JW2145 commented Oct 24, 2021

Hi just want ask and clarify somethings in terms of opening a file. Since both the master and slave are opening the same file which is the Tradecopy.csv, there would be a chance that both EA could open the file at the same time which could cause some errors since writing and reading into a file can't be done on the same time. And from what I've seen on the code it'll just print out the error and it'll go back to the start continuing the loop. Is there a better way to check on a file if there are records or modifications which happens on that file without using for loop again and again?

@vobornik
Copy link
Owner

You've raised a valid concern regarding concurrent access to the TradeCopy.csv file. A potential solution could involve utilizing an intermediary that supports simultaneous access. I've considered options like sqlite3 or even a more sophisticated approach using ZMQ combined with a database. However, integrating external DLLs or setting up a server would significantly increase the complexity of the system. Such enhancements might be more justified if there's a future requirement, such as receiving signals from Telegram channels or similar sources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants