Re: NSOutlineView threading problem
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