Skip to content

Instantly share code, notes, and snippets.

@pita5
Created July 24, 2012 21:54
Show Gist options
  • Save pita5/3172921 to your computer and use it in GitHub Desktop.
Save pita5/3172921 to your computer and use it in GitHub Desktop.
- (void)updateGalleryAndVideos:(void(^)(void))block
{
__unsafe_unretained NUData* wself = self;
dispatch_queue_t caller = dispatch_get_current_queue();
dispatch_async(queue, ^{
if (_updatingManufacturerResults) return;
_updatingManufacturerResults = YES;
[wself _updateGalleryAndVideos:block caller:caller];
_updatingManufacturerResults = NO;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment