-
Notifications
You must be signed in to change notification settings - Fork 1.4k
samples: net: MQTT: transport: Respect Run To Completion #24224
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
Conversation
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 0c3bdec99c83c55c744c2b7e0a6540b12d3c2b26 more detailssdk-nrf:
Github labels
List of changed files detected by CI (1)
Outputs:ToolchainVersion: 53a57c4d75 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a Run To Completion pattern for MQTT transport state management by introducing an event queue mechanism. Instead of directly changing states from MQTT callback threads, state changes are now queued as events and processed in the correct thread context.
Key changes:
- Introduces a private ZBUS channel for internal transport events
- Replaces direct state transitions in MQTT callbacks with event publishing
- Adds event processing logic in the main transport task
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
6fd60a3
to
7660f3e
Compare
Ensure that state changes are executed in order by queueing an event on callbacks from the internal MQTT thread. This ensures correct order and state changes in the state machine. Signed-off-by: Simen S. Røstad <[email protected]>
7660f3e
to
0c3bdec
Compare
@nrfconnect/ncs-modem |
Ensure that state changes are executed in order by queueing an event on callbacks from the internal MQTT thread. This ensures correct order and state changes in the state machine.