Re: passing complex objects between threads

2009-04-28 Thread Daniel Child
Thanks for the sugestion. I will keep the idea of passing object IDs in mind when that situation comes up. But I think I misled you. My data was not in Core Data yet, but rather in an archive I needed to unfreeze and place in Core Data. In the end, I did something similar to what you

Re: passing complex objects between threads

2009-04-24 Thread Eric Hermanson
I believe you should use a producer-consumer pattern where the consumer thread waits on a blocking queue for the incoming object, and the producer thread passes the fetched object to the blocking queue after its fetched. There are many examples of producer/consumer on the web... - Eric

Re: passing complex objects between threads

2009-04-24 Thread Chris Hanson
On Apr 24, 2009, at 6:24 PM, Daniel Child wrote: I have a Core Data app that imports data via a separate managed object contexts. Without multithreading, the operation works fine. But since the import takes over a minute, I want to do the import in a different thread. The data consists of