• 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
NSTableDataSources and multi-threading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableDataSources and multi-threading


  • Subject: NSTableDataSources and multi-threading
  • From: Sean Gilbertson <email@hidden>
  • Date: Tue, 4 Nov 2003 02:11:53 -0600

Hello all,

I have a data source, whose represented data is updated by several threads. Because of this, the result of numberOfRowsInTableView: may not be valid by the time tableView:objectValueForTableColumn:row: is called. I have tried several ways of making sure that this does not occur, including subclassing NSTableView and notifying the data source when reloadData is called, but of course that is not the appropriate place to look for redrawing of the table view; it is an auxiliary method. Of course, I am using locks, but they are almost worthless unless I can actually guarantee incorrupt output.

If anyone has a good method for guaranteeing authentic and reliable calls to table data source methods, as I have described them, please let me know -- brainstorming has brought no easy solutions. Note that copying the data represented by the data source does not help, because even this copy can change between calls to numberOfRowsInTableView: and tableView:objectValueForTableColumn:row:.

Thank you very much,
Sean
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSTableDataSources and multi-threading
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: List-mom time Re: [OFF] Localisation (was Re: Security Framework: authorization rights.)
  • Next by Date: Re: Open-source icons and graphics?
  • Previous by thread: List-mom time Re: [OFF] Localisation (was Re: Security Framework: authorization rights.)
  • Next by thread: Re: NSTableDataSources and multi-threading
  • Index(es):
    • Date
    • Thread