Skip to content

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 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
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.

1 participant