[Filesystem] Use non-static worker instead of singleton TaskQueue 82/259382/3
authorPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Tue, 8 Jun 2021 05:41:41 +0000 (07:41 +0200)
committerPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Tue, 8 Jun 2021 05:50:05 +0000 (07:50 +0200)
commit92b2155ff0c4a12306c418f7824a278f6e10ff5a
treed14486967d59ad46371c308d7899a47e8cf46096
parentc914da569e980ed633ed72e76bb8d1e6de1d3463
[Filesystem] Use non-static worker instead of singleton TaskQueue

In filesystem webapi, TaskQueue is a singleton instance used by
multiple FilesystemInstance. With thread model web service
applications, there might be smack violation because each service
app (thread) try to use same worker.

This commit resolves problem by changing usage of singleton TaskQueue to
a member worker owned by FilesystemInstance.

Commit keeps two separated workers for better operation
performance:
- global_worker queues 'global' operations on fielsystem instance e.g.
opening files, rename, move etc.
- file_worker queues only file operation as reading
Above design prevents to block 'quick' global operations in case of
long-lasting file reading/writing operation in background.

[Verification] Code compiles without errors.
Filesystem TCT passrate 100%.

Change-Id: Idf0bd1915f67b64a65fcc1afc2e17d011bb5b918
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Signed-off-by: Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
src/filesystem/filesystem_instance.cc
src/filesystem/filesystem_instance.h