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

locking for updatingRREFdict parameter #5

Merged
merged 1 commit into from
Oct 2, 2022

Conversation

wortelus
Copy link
Contributor

I was continously getting an error which eventually stopped the dataref updating (although commands were still able to send).

My program is running 20x/second and after few minutes, it always crashed with following error:

File "C:\Users\wortelus\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "C:\Users\wortelus\PycharmProjects\xpaneler\venv\lib\site-packages\pyxpudpserver\XPlaneUDPServer.py", line 540, in run
    for index, RREF in self.datarefsIndices.items():
RuntimeError: dictionary changed size during iteration

The solution to use locking eventually solved the problem.

@wortelus wortelus mentioned this pull request Jul 24, 2022
@leleopard leleopard merged commit 9c74637 into leleopard:master Oct 2, 2022
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

Successfully merging this pull request may close these issues.

2 participants