diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2020-02-10 11:47:45 -0500 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2020-02-10 11:47:45 -0500 |
commit | 224669fc49a1e4c28bd75271bf799fbce3921532 (patch) | |
tree | fe3244485c9c385b7d8f89690a2d1d9bce50b9bc | |
parent | 24477bd14a41ab292db69bb254e62f393ee5481f (diff) | |
download | sdl_ios-224669fc49a1e4c28bd75271bf799fbce3921532.tar.gz |
Remove unneeded synchronization
-rw-r--r-- | SmartDeviceLink/SDLResponseDispatcher.m | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/SmartDeviceLink/SDLResponseDispatcher.m b/SmartDeviceLink/SDLResponseDispatcher.m index 93c005d45..2c2c5fce6 100644 --- a/SmartDeviceLink/SDLResponseDispatcher.m +++ b/SmartDeviceLink/SDLResponseDispatcher.m @@ -151,14 +151,13 @@ NS_ASSUME_NONNULL_BEGIN } - (void)sdl_addToCustomButtonHandlerMap:(NSArray<SDLSoftButton *> *)softButtons { - @synchronized (self) { - for (SDLSoftButton *sb in softButtons) { - if (!sb.softButtonID) { - @throw [NSException sdl_missingIdException]; - } - if (sb.handler) { - self.customButtonHandlerMap[sb.softButtonID] = sb.handler; - } + // Don't need to synchronize this method because it's only called from `storeRequest:handler:` + for (SDLSoftButton *sb in softButtons) { + if (!sb.softButtonID) { + @throw [NSException sdl_missingIdException]; + } + if (sb.handler) { + self.customButtonHandlerMap[sb.softButtonID] = sb.handler; } } } |