[Bug] LoadPhoneNumbers must be called before FindThread.
Because of critical section of LoadPhoneNumbers lasts for
whole scope, so they can be called sequentially.
[Verification] Passrate 100%
Change-Id: I8207f488f0f4926d70d2289d42b1a46d2b98ee75
Signed-off-by: Pawel Kaczmarczyk <p.kaczmarczy@partner.samsung.com>
void CallHistory::find(const picojson::object& args) {
ScopeLogger();
- std::thread(LoadPhoneNumbers, args, this).detach();
- std::thread(FindThread, args, this).detach();
+ std::thread([args, this]() {
+ ScopeLogger("Entered into asynchronus function, std::thread's argument");
+ LoadPhoneNumbers(args, this);
+ FindThread(args, this);
+ }).detach();
}
PlatformResult CallHistory::remove(const picojson::object& args) {