Re: NSInvocationOperations and background Threads

2009-10-19 Thread John Love
Big thank you's to Ken Thomases, Nick Zitzmann and Quincey Morris (can't seem to find Quincey's email?) Found my stupid mistake .. stupid because you guys individually mentioned it time and time again. Namely, my -startBgThread begins in the main Thread. So when I call -startOperation to

Re: NSInvocationOperations and background Threads

2009-10-18 Thread Ken Thomases
On Oct 18, 2009, at 7:26 AM, John Love wrote: Thanks for your prompt reply, I really appreciate it. You're welcome. I have revamped my code to have just one NSInvocationOperation whose selector contains the long for-loop. [...] the long for-loop is within -doAllOperations. OK, as far i

Re: NSInvocationOperations and background Threads

2009-10-18 Thread John Love
Ken .. Thanks for your prompt reply, I really appreciate it. I have revamped my code to have just one NSInvocationOperation whose selector contains the long for-loop. A snippet looks like: itsOps = [[NSInvocationOperation alloc] initWithTarget:self

Re: NSInvocationOperations and background Threads

2009-10-17 Thread Ken Thomases
On Oct 16, 2009, at 8:01 AM, John Love wrote: In my app, I have a very long for-loop It appears however, that in my app there is no background Thread that begins and the reason for that is because my app's window stays in the background until all NSOperations are complete. Any clues? I

Re: NSInvocationOperations and background Threads

2009-10-16 Thread Nick Zitzmann
On Oct 16, 2009, at 7:01 AM, John Love wrote: I do not have a custom -start or a -main method, so I count on the default -start and -main methods to handle the creation of a background Thread for me. You don't need them if you're using NSInvocationOperation. The documentation was talking

NSInvocationOperations and background Threads

2009-10-16 Thread John Love
NSOperation.pdf states: "For a non-concurrent operation, an operation queue automatically creates a thread and calls the operation object’s start method, the default implementation of which configures the thread environment and calls the operation object’s main method to run your custom cod