Re: NSImage drawInRect deadlock

2016-08-08 Thread Kyle Sluder
On Mon, Aug 8, 2016, at 05:11 PM, Jens Alfke wrote: > > > On Aug 8, 2016, at 2:54 PM, Aaron Tuller wrote: > > > > "The following classes and functions are generally not thread-safe. In most > > cases, you can use these classes from any thread as long as you use them > > from only one thread at

Re: NSImage drawInRect deadlock

2016-08-08 Thread Jens Alfke
> On Aug 8, 2016, at 2:54 PM, Aaron Tuller wrote: > > "The following classes and functions are generally not thread-safe. In most > cases, you can use these classes from any thread as long as you use them from > only one thread at a time." The images are only being used on one thread at a tim

Re: NSImage drawInRect deadlock

2016-08-08 Thread Aaron Tuller
On Aug 8, 2016, at 1:48 PM, Jens Alfke wrote: > On Aug 8, 2016, at 12:46 PM, Aaron Tuller > wrote: >> >> Search for NSImage here: >> >> https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html#/

Re: NSImage drawInRect deadlock

2016-08-08 Thread Jens Alfke
> On Aug 8, 2016, at 12:46 PM, Aaron Tuller wrote: > > Search for NSImage here: > > https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html#//apple_ref/doc/uid/1057i-CH12-126728 > >

Re: NSImage drawInRect deadlock

2016-08-08 Thread Aaron Tuller
Search for NSImage here: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html#//apple_ref/doc/uid/1057i-CH12-126728 It sounds like you may need to do this serially, or try setting the cache mode to NSImageCacheNeve

Re: Justification of collection cells in sections

2016-08-08 Thread Doug Hill
Hello Peter, Thanks for the info. I'm still trying to see if I can do what I want with the stock flow layout. FWIW, it appears that the behavior of the flow layout class is to center items when there is one section. This appears to be a summary of the behavior: Collection has one section: • I

NSImage drawInRect deadlock

2016-08-08 Thread Andrew Keller
Hi all, In my app, I’m creating thumbnails of images. To do this in parallel, I’m using the global background dispatch queue: dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ @autoreleasepool { NSSize *thumbnailSize = // calculate thumbnail size