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

Ensure exclusive access to radios per editorset #695

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

Conversation

kk7ds
Copy link
Owner

@kk7ds kk7ds commented Jul 1, 2023

A ChirpLiveEditorSet represents a conversation with a single radio
endpoint, but may involve multiple independent event streams. We
really don't need multiple threads and queues for talking to a single
radio, however radios with multiple sub-devices will end up with
different Radio classes by nature. So, instead of collapsing editors
into a single thread, we can just make them share a lock, established
at the EditorSet level, which is what this patch does.

This also means the other drivers (that I know of) that do their
own locking (kenwood_live, kenwood_d7, because settings) and ic9x
(because multiple sub-devices) can simplify and rely on this being
handled in the UI.

A ChirpLiveEditorSet represents a conversation with a single radio
endpoint, but may involve multiple independent event streams. We
really don't need multiple threads and queues for talking to a single
radio, however radios with multiple sub-devices will end up with
different Radio classes by nature. So, instead of collapsing editors
into a single thread, we can just make them share a lock, established
at the EditorSet level, which is what this patch does.

This also means the other drivers (that I know of) that do their
own locking (kenwood_live, kenwood_d7, because settings) and ic9x
(because multiple sub-devices) can simplify and rely on this being
handled in the UI.

Related to #10683
@kk7ds
Copy link
Owner Author

kk7ds commented Jul 1, 2023

FYI @W8BSD this should make any threads for a single radio exclusive so we don't try to have more than one simultaneous conversation with the radio at a time. I've tested on a D700 for your new module, a TM-281 to confirm kenwood_live, and an IC-92 to get the other one. If you have a chance to look this over and/or test before we merge, that'd be cool. No rush since it's just cleanup.

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