[messaging] Fix synchronization issues 41/206641/1 accepted/tizen_5.0_unified accepted/tizen/5.0/unified/20190529.001828 submit/tizen_5.0/20190528.054019
authorPawel Wasowski <p.wasowski2@samsung.com>
Thu, 9 May 2019 11:31:49 +0000 (13:31 +0200)
committerPawel Wasowski <p.wasowski2@samsung.com>
Wed, 22 May 2019 10:36:28 +0000 (10:36 +0000)
commitd028a5ddc48cf2a342b51f61deb08fdf7e4153e3
treeea67afdb1b7ddc718af98902a274f076800a4dc1
parent8a233bee0f185dac7990a0e22b7d49134640df6a
[messaging] Fix synchronization issues

Due to the delay between updating email with native C API functions and
updates of the corresponding message/thread records in the mail
database, race conditions occured in the previous implementation,
resulting in inconsitencies between thread_ids in the DB and those of
messages in JS layer. Active waits have been added to mitigate this
problems.

[Verification] tct-tizen-messaging-email pass rate: 100%

Change-Id: Ie0771ffc40e6cdee696756a8e831ae56bbe8f84d
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
(cherry picked from commit 1440977fb5202077c98d86da90ee2046bc213132)
src/messaging/email_manager.cc
src/messaging/message.cc
src/messaging/message.h