Create NSImage on background queue.

This commit is contained in:
Brent Simmons 2017-11-23 12:15:33 -08:00
parent b4ff1785ab
commit 3282f0ec09
1 changed files with 4 additions and 3 deletions

View File

@ -16,9 +16,10 @@
NSParameterAssert(data != nil); NSParameterAssert(data != nil);
NSImage *image = [[NSImage alloc] initWithData:data]; dispatch_async(dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{
NSImage *image = [[NSImage alloc] initWithData:data];
RSCallBlockWithParameter(imageResultBlock, image); RSCallBlockWithParameter(imageResultBlock, image);
});
} }