summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSho Amano <samano@xevo.com>2018-09-26 11:41:30 +0900
committerSho Amano <samano@xevo.com>2018-09-26 11:41:30 +0900
commit9095a117b9e1bee3c59e267bf7fda629e490eb91 (patch)
treec11862d37efd358aa69b38a01a819f6cc0b99328
parentbe11e630d5f1504a7c060aab673ea96cb8dd375f (diff)
downloadsdl_ios-9095a117b9e1bee3c59e267bf7fda629e490eb91.tar.gz
Update sdl_transitionToState: to use dispatch_sync
as per discussion on PR.
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m
index 85aced96a..2f86132d1 100644
--- a/SmartDeviceLink/SDLLifecycleManager.m
+++ b/SmartDeviceLink/SDLLifecycleManager.m
@@ -602,7 +602,8 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
if (strcmp(dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL), dispatch_queue_get_label(self.lifecycleQueue)) == 0) {
[self.lifecycleStateMachine transitionToState:state];
} else {
- dispatch_async(self.lifecycleQueue, ^{
+ // once this method returns, the transition is completed
+ dispatch_sync(self.lifecycleQueue, ^{
[self.lifecycleStateMachine transitionToState:state];
});
}