mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
I wrote a bunch of code with the Mutex::Unlocker and didn't understand it. (#2150)
This commit is contained in:
committed by
Adlai Holler
parent
905508e9be
commit
e6e5c346de
@@ -224,15 +224,16 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0};
|
||||
|
||||
- (void)setShouldRenderProgressImages:(BOOL)shouldRenderProgressImages
|
||||
{
|
||||
ASDN::MutexLocker l(__instanceLock__);
|
||||
__instanceLock__.lock();
|
||||
if (shouldRenderProgressImages == _shouldRenderProgressImages) {
|
||||
__instanceLock__.unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
_shouldRenderProgressImages = shouldRenderProgressImages;
|
||||
|
||||
|
||||
ASDN::MutexUnlocker u(__instanceLock__);
|
||||
__instanceLock__.unlock();
|
||||
[self _updateProgressImageBlockOnDownloaderIfNeeded];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user