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

Suppress warnings when the client has been stopped #80

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

bugadani
Copy link
Contributor

When the client is dropped, tokio can poll the select!-ed futures in a random order, and the client implementation can emit warnings if the WireRx, or the internal receiver are polled before the stopper is.

This PR ensures the cancel future is polled first, which doesn't let the streams run into errors if the client is stopped before dropping it.

@jamesmunns jamesmunns merged commit 0c94838 into jamesmunns:main Jan 20, 2025
1 check passed
@bugadani bugadani deleted the stop branch January 20, 2025 19:00
jamesmunns added a commit that referenced this pull request Jan 24, 2025
* chore: update to latest embassy-time, embassy-executor.

* Fix deprecation messages (#77)

* docs: fix broken link and typos (#78)

* Suppress warnings when the client has been stopped (#80)

* Undeprecate solo subscribers, implement backpressure with timeout (#82)

* Undeprecate subscribe, add subscribe_exclusive

* Add new_with_wire_and_config

* Add subscriber_timeout_if_full configuration

* Allow replacing closed channels

* Split inner functions

* Implement conversion from `VarSeq` and relax equality comparison (#66)

* implement conversion of VarSeq to u8, u16, u32

* change varseq equality to compare key numbers

this adds a manual implementation of `PartialEq` to treat different
variants with the same key value as equal.

Previously `VarSeq::Seq1(1) != VarSeq::Seq2(1)`, with this change they
are treated as equal.

* add simple unit tests for varseq conversion

---------

Co-authored-by: Hendrik v. Raven <[email protected]>

* Cleanup some misc items

* Bump version

* Explicitly support embassy-usb v0.4

---------

Co-authored-by: Dániel Buga <[email protected]>
Co-authored-by: kzdnk <[email protected]>
Co-authored-by: Hendrik v. Raven <[email protected]>
Co-authored-by: Hendrik v. Raven <[email protected]>
Co-authored-by: James Munns <[email protected]>
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