Re: Concurrent tasks are getting hung up

2014-10-10 Thread Keith Stattenfield
> On Oct 9, 2014, at 10:32 PM, Greg Parker wrote: > > Odds are that it's a bug in LaunchServices client or server and not your code, Actually I suspect this may be a problem in your code, if you hae created many dispatch queues and if they are all blocked such that libdispatch doesn't have a

Re: Scaling an NSImage to have exact pixel dimensions

2014-10-10 Thread Graham Cox
On 10 Oct 2014, at 3:57 pm, Carl Hoefs wrote: > If there’s a cleaner way, please let me know! // ... set up destination context ... [[NSGraphicsContext currentContext] setImageInterpolation: NSImageInterpolationHigh]; [sourceImage drawInRect:dest fromRect:NSZeroRect operation:NSCompositeCop

Re: Concurrent tasks are getting hung up

2014-10-10 Thread Steve Mills
On Oct 10, 2014, at 02:28:56, Keith Stattenfield wrote: > Actually I suspect this may be a problem in your code, if you hae created > many dispatch queues and if they are all blocked such that libdispatch > doesn't have another default dispatch queue available to run the reply block > for the

Re: Concurrent tasks are getting hung up

2014-10-10 Thread Steve Mills
On Oct 10, 2014, at 00:32:26, Greg Parker wrote: > That looks like LaunchServices waiting for an XPC reply from something, > probably launchservicesd. You should try sampling launchservicesd while this > is hanging to see if the server is getting stuck while processing the > request. I tried

Re: Concurrent tasks are getting hung up

2014-10-10 Thread Kyle Sluder
> On Oct 10, 2014, at 6:42 AM, Steve Mills wrote: > > I've only created one NSOperationQueue and added many NSInvocationOperation > to it. NSOperationQueue works by dispatching your blocks to the global async GCD queue. If you send a thousand blocks to be async processed at once, GCD will kee

Re: Concurrent tasks are getting hung up

2014-10-10 Thread Jim Crate
On Oct 10, 2014, at 11:00 AM, Kyle Sluder wrote: >> On Oct 10, 2014, at 6:42 AM, Steve Mills wrote: >> >> I've only created one NSOperationQueue and added many NSInvocationOperation >> to it. > > NSOperationQueue works by dispatching your blocks to the global async GCD > queue. If you send a

Re: Concurrent tasks are getting hung up

2014-10-10 Thread Kevin Meaney
On 10 Oct 2014, at 16:27, Jim Crate wrote: > On Oct 10, 2014, at 11:00 AM, Kyle Sluder wrote: > >>> On Oct 10, 2014, at 6:42 AM, Steve Mills wrote: >>> >>> I've only created one NSOperationQueue and added many NSInvocationOperation >>> to it. >> >> NSOperationQueue works by dispatching you

Re: Scaling an NSImage to have exact pixel dimensions

2014-10-10 Thread Carl Hoefs
On Oct 10, 2014, at 1:02 AM, Graham Cox wrote: > > // ... set up destination context ... > > [[NSGraphicsContext currentContext] setImageInterpolation: > NSImageInterpolationHigh]; > [sourceImage drawInRect:dest fromRect:NSZeroRect operation:NSCompositeCopy > fraction:1.0 respectFlipped:YES hi

Re: Concurrent tasks are getting hung up

2014-10-10 Thread Scott Ribe
On Oct 10, 2014, at 10:20 AM, Kevin Meaney wrote: > Now I've been optimizing to maximize throughput for processing image files... Things depend VERY much on what exactly you're doing. I've optimized for throughput of processing image files, and found that number of worker threads equal to logi

Re: Concurrent tasks are getting hung up

2014-10-10 Thread Kevin Meaney
On 10 Oct 2014, at 17:40, Scott Ribe wrote: > On Oct 10, 2014, at 10:20 AM, Kevin Meaney wrote: > >> Now I've been optimizing to maximize throughput for processing image files... > > Things depend VERY much on what exactly you're doing. I've optimized for > throughput of processing image file

Re: XPCService not getting launched from app

2014-10-10 Thread excelpbhardwaj...@gmail.com
Try these : 1. Bundle identifier for xpc service target be subdomain of main bundle identifier 2. Use bundle id of xpc target while initialising xpc connection 3. Add copy files build phase to copy service to contents/xpcservices 4. In main target add target dependency on xpc target

Re: Open document panel always on top - Mountain Lion

2014-10-10 Thread Matthew LeRoy
Ah, I see, I thought you were already *providing* a completion handler somewhere, but I guess you’re not. In that case, I think you would override -[NSDocumentController openDocumentWithContentsOfURL:display:completionHandler:], like this: … snip … Just make sure that the password verification

Re: Open document panel always on top - Mountain Lion

2014-10-10 Thread Quincey Morris
On Oct 10, 2014, at 13:34 , Matthew LeRoy wrote: > Not entirely sure where to go from here. It’s not clear to me whether the deferral of the open panel’s disappearance is a mere implementation detail of NSDocumentController, or if it’s a consequence of what you chose to do in your completion h

Re: Concurrent tasks are getting hung up

2014-10-10 Thread Steve Mills
On Oct 10, 2014, at 10:00:02, Kyle Sluder wrote: > NSOperationQueue works by dispatching your blocks to the global async GCD > queue. If you send a thousand blocks to be async processed at once, GCD will > keep spinning up threads to try to service them until it exhausts the thread > limit and

How to pretty print (big)numbers?

2014-10-10 Thread Gerriet M. Denkmann
On iOS 8.0: UInt64 sum = 16494631536958186120UL; NSString *sumString = [ NSNumberFormatter localizedStringFromNumber: @(sum) numberStyle:NSNumberFormatterDecimalStyle

Re: How to pretty print (big)numbers?

2014-10-10 Thread Greg Parker
> On Oct 10, 2014, at 11:03 PM, Gerriet M. Denkmann > wrote: > > On iOS 8.0: > > UInt64 sum = 16494631536958186120UL; > NSString *sumString = [ NSNumberFormatter > localizedStringFromNumber: @(sum) >