Re: NSTableDataSources and multi-threading
Re: NSTableDataSources and multi-threading
- Subject: Re: NSTableDataSources and multi-threading
- From: Dustin Voss <email@hidden>
- Date: Thu, 6 Nov 2003 15:26:33 -0800
On 6 Nov, 2003, at 12:05 AM, Sean Gilbertson wrote:
On Nov 5, 2003, at 12:11 AM, Shawn Erickson wrote:
Otherwise I would consider modifying your data source on the main
thread only (possibly in bursts, queuing in your background threads a
little). This will insure that your view isn't updating at the same
time that your data source is changing. Look at using NSObject's
performSelectorOnMainThread.
I was looking through the documentation for this method. The main
thread does all the UI work, right?? That would work -- it's dirty,
but it will work. I only hope I don't catch the main thread in between
calls. Is that possible? I would hope that Cocoa would be intelligent
enough to avoid that, but who knows?
No, you won't catch the main thread in the middle of a function call.
The performSelectorOnMainThread methods put the selector on the run
loop, so it gets handled like UI events or timers get handled.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.