sdl_ios icon indicating copy to clipboard operation
sdl_ios copied to clipboard

Bugfix/issue 1745 simplify locking

Open joeljfischer opened this issue 5 years ago • 1 comments

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 avatar Aug 05 '20 20:08 joeljfischer

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     

codecov[bot] avatar Aug 05 '20 20:08 codecov[bot]