diff options
author | Ira Lytvynenko (GitHub) <ILytvynenko@luxoft.com> | 2020-02-14 20:32:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-14 13:32:24 -0500 |
commit | ece258838a44a5461d718c5eeae380ad11a3769b (patch) | |
tree | 455d6c08c2295caeaca682348e0bc88ab1950666 /src/components/include/utils/data_accessor.h | |
parent | 656cb05756bbc20625adad8e4b2dcb6f40359352 (diff) | |
download | sdl_core-ece258838a44a5461d718c5eeae380ad11a3769b.tar.gz |
Fix LastState methods thread safe access (#2626)
* Fix LastState instance thread safe access
Fix LastState instance thread safe access
and update dictionary usages in app launch and resumption.
There was implemented LastStateWrapper class for providing exclusive
thread safe access to LastState instance from all places in the program.
Also passing LastState object was replaced with LastStateWrapper object
to avoid direct access to LastState instance from another components.
Thus there were a small updates in architecture of AM and TM classes.
* Fixed mocks and unit tests related to LastState class
* Add LastStateWrapper interface and LastStateWrapperPtr typedef
* Fix tests after adding LastStateWrapper interface
* Deprecate methods with changed signature
* Adapt RCConsentManager according to LastState functionality
There are some deprecated methods in LastState that are used by
RCConsentManager.
In addition, LastState::dictionary method returns reference to
dictionary no more - only copy of latter.
* Adapt AppServiceManager to new LastState usage
* Adapt transport manager to new LastState usage
* Adapt RPCPlugin to new LastState usage
* Adapt AppServiceRPCPlugin to new LastState usage
* Adapt RCRPCPlugin to new LastState usage
* Adapt SDLRPCPlugin to new LastState usage
* Adapt VehicleInfoPlugin to new LastState usage
* Adapt existing unit tests
* Fix ENABLE_LOG off build failure
* Replace old-style loops with range based
* Fix potential mutex deadlocks in resumption storage
* Add Mutable Data Accessor.
The entity that provides the thread-safe mutable access to data.
* Fix submodule issues after merge
Co-authored-by: Alexander Kutsan (GitHub) <akutsan@luxoft.com>
Co-authored-by: Yaroslav Mamykin (GitHub) <33784535+YarikMamykin@users.noreply.github.com>
Co-authored-by: Igor Gapchuk (GitHub) <41586842+IGapchuk@users.noreply.github.com>
Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com>
Diffstat (limited to 'src/components/include/utils/data_accessor.h')
-rw-r--r-- | src/components/include/utils/data_accessor.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/components/include/utils/data_accessor.h b/src/components/include/utils/data_accessor.h index 1be7c3ab53..99820237c8 100644 --- a/src/components/include/utils/data_accessor.h +++ b/src/components/include/utils/data_accessor.h @@ -56,6 +56,7 @@ class DataAccessor { --(*counter_); } } + const T& GetData() const { return data_; } |