Lock model cache manager access for thread safety 99/293199/11
authorEunki Hong <eunkiki.hong@samsung.com>
Mon, 22 May 2023 14:32:59 +0000 (23:32 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 7 Jun 2023 08:33:39 +0000 (17:33 +0900)
commit25143ba45f6cdb0029baa0736b554180c436a92a
tree882011aa5fffd62627ab97814c6c2e97b588895e
parentb4d72c1340d91c64bee88f050f070896d06d7121
Lock model cache manager access for thread safety

Since we can access to mModelCache by ModelCacheManager,
and also we can create new items (== change container itself)
Add a global mutex lock for cache manager API.

And also, add some comment why we use std::map for cache.

And also, do not open conditional wait object out of cache.

And also, increase reference count of model so we can run this function
more thread safety.

TODO : We MUST not access into model cache manager from worker thread.
(Since worker thread can Process even main thread shutdown.)
MUST be refactorize.

Change-Id: I81e95a5f5df8c16dbaf6b84b6ddd3cd4809121d0
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
automated-tests/src/dali-scene3d-internal/utc-Dali-ModelCacheManager.cpp
dali-scene3d/internal/common/model-cache-manager.cpp
dali-scene3d/internal/common/model-cache-manager.h
dali-scene3d/internal/common/model-load-task.cpp
dali-scene3d/internal/controls/model/model-impl.cpp