• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: DataSource modified while TableView is displaying data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: DataSource modified while TableView is displaying data (From: Peter Hudson <email@hidden>)
 >Re: DataSource modified while TableView is displaying data (From: Jean Suisse <email@hidden>)
 >Re: DataSource modified while TableView is displaying data (From: Corbin Dunn <email@hidden>)
 >Re: DataSource modified while TableView is displaying data (From: Jean Suisse <email@hidden>)
 >Re: DataSource modified while TableView is displaying data (From: Roland King <email@hidden>)
 >Re: DataSource modified while TableView is displaying data (From: Jean Suisse <email@hidden>)

  • Prev by Date: Re: DataSource modified while TableView is displaying data
  • Next by Date: Re: Save panel showing as a blank sheet
  • Previous by thread: Re: DataSource modified while TableView is displaying data
  • Next by thread: Re: DataSource modified while TableView is displaying data
  • Index(es):
    • Date
    • Thread