CoreData & Multithreading...
CoreData & Multithreading...
- Subject: CoreData & Multithreading...
- From: Lee Morgan <email@hidden>
- Date: Tue, 24 May 2005 21:45:19 -0400
My CoreData app has a entity (instances of it go upwards of 10,000)
that retrieve information from the internet.
The information is about 50KB for each instance.
I want my app's GUI to run without any interruption when it needs to
retrieve this information - so the natural thought is to create a
thread.
However I still want the entities to remain mutable in the GUI (they
are displayed via a table view) while the worker thread is updating
parts of them. I am willing to "lock" a single entity at a time (like
iTunes does while importing a song).
Since the information is across the network I don't see much of a
reason to make parallel url fetches. Instead I was planing on either
spawning one thread after the previous one ended for each entity
(seems wasteful). Or to create one worker thread with a pool of
entities it needs to update and have it run through them (might be
hard to add / remove entities from this pool?).
Also is there any specific problems related to CoreData and
multithreading? Such as a context can't be used by two threads at the
same time?
I have virtually zero experience with threading. So any suggestions,
advice, cautions, etc. are welcome.
Thanks,
Lee
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden