diff options
author | Sho Amano <samano@xevo.com> | 2018-09-26 11:41:30 +0900 |
---|---|---|
committer | Sho Amano <samano@xevo.com> | 2018-09-26 11:41:30 +0900 |
commit | 9095a117b9e1bee3c59e267bf7fda629e490eb91 (patch) | |
tree | c11862d37efd358aa69b38a01a819f6cc0b99328 | |
parent | be11e630d5f1504a7c060aab673ea96cb8dd375f (diff) | |
download | sdl_ios-9095a117b9e1bee3c59e267bf7fda629e490eb91.tar.gz |
Update sdl_transitionToState: to use dispatch_sync
as per discussion on PR.
-rw-r--r-- | SmartDeviceLink/SDLLifecycleManager.m | 3 |
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]; }); } |