[Tizen] Lock model cache manager access for thread safety 94/296894/4
authorEunki Hong <eunkiki.hong@samsung.com>
Mon, 22 May 2023 14:32:59 +0000 (23:32 +0900)
committerseungho baek <sbsh.baek@samsung.com>
Wed, 23 Aug 2023 04:50:32 +0000 (13:50 +0900)
commitf51f331a257b86597f10ae942f78e55142e1d26a
treed9c36018f694c0a32d47f579f20e5368c0c0e287
parente75c4a8f1c3f704e26432db267ca96c4d913aafb
[Tizen] 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