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

athenad: refactor deviceState handling with centralized SubMaster #34512

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Jan 31, 2025

This PR introduces a NetworkStatus class to centralize deviceState management and improve efficiency.

Changes:

  1. Single SubMaster Instance:
    Replaces the creation of multiple SubMaster(['deviceState']) instances in the upload_handler threads with a single shared instance, enhancing performance and reducing resource usage.
  2. Thread-safe Access:
    Provides thread-safe methods to update and read network status (metered, network_type).

@deanlee deanlee force-pushed the athenad_safe_update_sm branch from 5202768 to d608aae Compare January 31, 2025 08:38
@deanlee deanlee marked this pull request as ready for review January 31, 2025 08:47
@deanlee deanlee force-pushed the athenad_safe_update_sm branch from d608aae to 662a9b3 Compare January 31, 2025 09:01
@deanlee deanlee force-pushed the athenad_safe_update_sm branch from 662a9b3 to 5c2a383 Compare January 31, 2025 09:02
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.

1 participant