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

Fix serial handler race condition Fixes #9 #10

Merged
merged 8 commits into from
Jan 22, 2022

Conversation

semuadmin
Copy link
Contributor

PyGPSClient Pull Request Template

Description

Amend serial_handler() to avoid race condition on null data stream.

Fixes # (issue)

#9

Testing

Please test all changes, however trivial, against the supplied unittest suite tests/test_*.py e.g. by executing the tests/testsuite.py
module or using your IDE's native Python unittest integration facilities.
Please describe any test cases you have amended or added to this suite to maintain >= 99% code coverage.

  • Tested on all platforms Windows, Linux, MacOS, RPiOS

Checklist:

  • My code follows the style guidelines of this project (see CONTRIBUTING.MD).
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • (if appropriate) I have added test cases to the tests/test_*.py unittest suite to maintain >= 99% code coverage.
  • I have tested my code against the full tests/test_*.py unittest suite.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I understand and acknowledge that the code will be published under a BSD 3-Clause license.

@semuadmin semuadmin added the bug Something isn't working label Jan 21, 2022
Copy link
Contributor

@semudev2 semudev2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have tested with Python 3.8, 3.9 & 3.10 on Windows 10 & 11, Ubuntu 20 & 21, MacOS 11 & 12 and RaspiOS. Null stream and protocol filtering seem to work fine and consistently on all platforms.

FYI runs significantly slower on Python 3.10 / MacOS 12 but, as you've indicated, this is a MacOS tkinter problem rather than a pygpsclient problem).

@semudev2 semudev2 merged commit 0167e5c into master Jan 22, 2022
@semudev2 semudev2 deleted the fix-serial-handler-race-condition branch January 22, 2022 10:10
@semuadmin
Copy link
Contributor Author

@semudev2 out of interest, were you running on an M1 Mac? I hear the Python 10 tkinter performance is particularly poor on these?

Shame, as on the Dell XPS Ubuntu platform I normally use it flies (at least 3 times faster than an Intel Macbook Pro) - admittedly a compiled version of Python 3.10.2 with stable optimizations enabled. I did try compiling Python 3.10 with tkinter on MacOS but life is too short.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PyGPSClient becomes unresponsive if NMEA & UBX message rates are all set to zero.
2 participants