iOS A few questions about NSOperation

idelovski

macrumors regular
Original poster
Sep 11, 2008
235
0
Just made my application store images to an SQLite database in background thread using NSOperationQueue and NSOperation and at first glance it seems to work nicely, but I have a few questions.

1. Do I need to have only one instance of NSOperationQueue in my application or can I have one for database things, another in charge of web requests and another doing some other stuff? Can they operate at the same time? Should they?

2. What happens when I receive -applicationWillTerminate: or similar messages? Do I need to check somehow if there are operations still in the queue?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.