From: Jay Freeman (saurik) Date: Mon, 10 Nov 2014 03:46:05 +0000 (-0800) Subject: Use @synchronized instead of manual [lock/unlock]. X-Git-Tag: v0.9.3500~12 X-Git-Url: https://git.saurik.com/veency.git/commitdiff_plain/c432528ed0975a95fd219e77533cd0a5074e8f48?ds=inline Use @synchronized instead of manual [lock/unlock]. --- diff --git a/Tweak.mm b/Tweak.mm index db1f623..9f45f29 100644 --- a/Tweak.mm +++ b/Tweak.mm @@ -945,7 +945,7 @@ static void VNCEnabled() { if (screen_ == NULL) return; - [lock_ lock]; + @synchronized (lock_) { Boolean valid; bool enabled(CFPreferencesGetAppBooleanValue(CFSTR("Enabled"), CFSTR("com.saurik.Veency"), &valid)); @@ -963,7 +963,7 @@ static void VNCEnabled() { running_ = false; } - [lock_ unlock]; + } } static void VNCNotifyEnabled(