[messaging] Fix synchronization issues 33/205833/7 accepted/tizen/unified/20190512.221908 submit/tizen/20190510.110853
authorPawel Wasowski <p.wasowski2@samsung.com>
Thu, 9 May 2019 11:31:49 +0000 (13:31 +0200)
committerPawel Wasowski <p.wasowski2@samsung.com>
Fri, 10 May 2019 09:32:20 +0000 (11:32 +0200)
commit1440977fb5202077c98d86da90ee2046bc213132
tree5883cd8cbfa6ca5a8abca56665d274ebe2827e0a
parent38b2dacddc2f0f92080cfb26bd9b044878f3323f
[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>
src/messaging/email_manager.cc
src/messaging/message.cc
src/messaging/message.h