Re: DataSource modified while TableView is displaying data
Re: DataSource modified while TableView is displaying data
- Subject: Re: DataSource modified while TableView is displaying data
- From: Scott Ribe <email@hidden>
- Date: Fri, 27 Apr 2012 07:40:47 -0600
On Apr 27, 2012, at 7:19 AM, Jean Suisse wrote:
> Dispatching the datasource modification / tableview reloadData code on the main thread. Waiting for it to be executed. And avoiding deadlocks by querying [NSThread isMainThread] and taking the appropriate action. This pattern works perfectly in my context, but requires more refinement if several threads have access to the controller.
It would be much simpler to post updates to the main thread, and let them be run on their own schedule. Then you have no need for synchronization, no worries about deadlock, no busy-polling loop...
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden