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

NSArrayController and threading


  • Subject: NSArrayController and threading
  • From: Joe Chan <email@hidden>
  • Date: Sun, 19 Dec 2004 15:58:51 -0500

I have a general question about threading and NSArrayController. For the model objects that I need to display in a NSTableView, one of the columns is for thumbnails (and the model object has a thumbnail key that returns an NSImage). Since loading a bunch of thumbnails can take a while, I'm planning to have the model object returns a placeholder NSImage, and then go off and fetch the thumbnail in a the thread. My question is how to do so safely. There is no indication that NSArrayController is thread safe, and having another thread calling [obj setThumbnail] after the thumbnail is loaded (which trigger all the KVO stuff in that thread) is probably a bad idea. One idea I have is to set up a work queue and and NSTimer in the main thread to retrieve the thumbnail as they are loaded. Any better ideas?

--
Joe Chan
Sun Microsystems, Inc.
Burlington, MA
Tel: (781) 442-0809

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSArrayController and threading
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: How to display a Menu for a popup button?
  • Next by Date: Re: Contextual menu for Text fields/views?
  • Previous by thread: Re: Contextual menu for Text fields/views?
  • Next by thread: Re: NSArrayController and threading
  • Index(es):
    • Date
    • Thread