how to access the same file among multiple controllers? #5523
tony-jiady
announced in
Q&A
Replies: 1 comment
-
Since each controller is an independent process, the question is more about the synchronization of two processes trying to access the same file. It is not Webots specific, but a general Python programming question. Maybe this is not the best place to ask such a question. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I am trying to synchronise the access to the same file among multiple controllers programmed in Python. I intended to use lock to prevent the race condition, but have no idea of how to share the same locker among the multiple controllers, i.e. if I create the lock in one controller: threadlock = threading.Lock(), how to pass the lock to other controllers? (all control threads are created based on the same controller file) Many thanks.
Beta Was this translation helpful? Give feedback.
All reactions