• 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: NSOutlineView threading problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView threading problem


  • Subject: Re: NSOutlineView threading problem
  • From: Bill Bumgarner <email@hidden>
  • Date: Sat, 14 Jun 2008 21:12:44 -0700

On Jun 14, 2008, at 7:19 PM, David wrote:
I am using NSMutableArrays to hold the nodes in the tree. One thread is
adding child nodes while the main thread maybe accessing the arrays through
the data source. I find it hard to imagine that NSMutableArray could be
causing the problem.

Neither NSOutlineView nor NSMutableArray are thread safe.

Unless the documentation explicitly claims thread safety, assume the class is not thread safe. As well, no amount of locking will make a non-thread-safe object thread-safe unless you absolutely positively know that only your code (and only your code protected by the locks) contain the only reference to said object.

Regardless, in this case, NSMutableArray (along with the rest of the mutable collection classes) are explicitly documented as *not* being thread safe.

b.bum

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Follow-Ups:
    • Re: NSOutlineView threading problem
      • From: j o a r <email@hidden>
References: 
 >NSOutlineView threading problem (From: David <email@hidden>)

  • Prev by Date: Re: NSOutlineView threading problem
  • Next by Date: Re: using NSFileManager to read data
  • Previous by thread: Re: NSOutlineView threading problem
  • Next by thread: Re: NSOutlineView threading problem
  • Index(es):
    • Date
    • Thread