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

Move acquire/release to the connection vtable #285

Merged
merged 3 commits into from
May 24, 2023

Conversation

bretambrose
Copy link
Contributor

@bretambrose bretambrose commented May 19, 2023

The adapter's shutdown process needs to support additional logic within the scope of the state lock when the decision to shutdown is made (ref count zero). The simple ref count object in common cannot support this (atomic integers are insufficient), so we do the ref count by hand in the adapter so that we can disable the adapter inside the lock in one atomic action.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 80.64% and no project coverage change.

Comparison is base (4885afb) 81.17% compared to head (bb1013d) 81.18%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #285   +/-   ##
=======================================
  Coverage   81.17%   81.18%           
=======================================
  Files          18       18           
  Lines        7311     7322   +11     
=======================================
+ Hits         5935     5944    +9     
- Misses       1376     1378    +2     
Impacted Files Coverage Δ
source/mqtt3_to_mqtt5_adapter.c 76.19% <72.72%> (-2.19%) ⬇️
source/client.c 65.46% <100.00%> (+0.17%) ⬆️
source/client_impl_shared.c 77.27% <100.00%> (-0.51%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bretambrose bretambrose merged commit a661c9d into main May 24, 2023
31 checks passed
@bretambrose bretambrose deleted the RefactorAdapterRefcount branch May 24, 2023 16:07
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.

None yet

3 participants