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

Bugfix/issue 1745 simplify locking #1747

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

joeljfischer
Copy link
Contributor

Fixes #1745

Risk

This PR makes no API changes.

Testing Plan

  • I have verified that I have not introduced new warnings in this PR (or explain why below)
  • I have run the unit tests with this PR
  • I have tested this PR against Core and verified behavior (if applicable, if not applicable, explain why below).

Unit Tests

Unit tests were added for the new classes.

Core Tests

[List of tests performed against Core and behaviors verified]

Core version / branch / commit hash / module tested against: [INSERT]
HMI name / version / branch / commit hash / module tested against: [INSERT]

Summary

This PR adds a new mutable dictionary class and mutable array class that provide thread-safety around accesses by using a queue passed to the class. This is intended to simplify locks around dictionaries and arrays in the SDL project by unifying them into one testable class.

Changelog

Other
  • Simplify locking around "hot" mutable dictionaries and arrays by providing thread-safe versions.

Tasks Remaining:

  • Replace existing locked dictionaries and arrays with the new versions.

CLA

@joeljfischer joeljfischer added the best practice Not a defect but something that should be improved anyway label Aug 5, 2020
@joeljfischer joeljfischer added this to In progress in v7.0.0 via automation Aug 5, 2020
@joeljfischer joeljfischer self-assigned this Aug 5, 2020
@codecov
Copy link

codecov bot commented Aug 5, 2020

Codecov Report

Merging #1747 into develop will increase coverage by 0.06%.
The diff coverage is 92.07%.

@@             Coverage Diff             @@
##           develop    #1747      +/-   ##
===========================================
+ Coverage    84.01%   84.07%   +0.06%     
===========================================
  Files          408      410       +2     
  Lines        20899    21010     +111     
===========================================
+ Hits         17558    17664     +106     
- Misses        3341     3346       +5     

# Conflicts:
#	SmartDeviceLink-iOS.xcodeproj/project.pbxproj
* Add locked map table
* Integrate to SystemCapabilityManager
* Start integration on response dispatcher
* Creating mutable set
@joeljfischer joeljfischer removed this from In progress in v7.0.0 Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
best practice Not a defect but something that should be improved anyway
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant