Re: Better sorting using threads?
Re: Better sorting using threads?
- Subject: Re: Better sorting using threads?
- From: Ken Ferry <email@hidden>
- Date: Fri, 12 Mar 2010 16:02:35 -0800
No, that would mean that you tried to mutate a non-mutable dictionary. :-)
You were getting lucky before in that some dictionary was passed to you
that was typed as NSDictionary, but _happened_ to be of the subclass
NSMutableDictionary. _That's_ what changed on you.
Be aware that if you send -copy to an NSMutableDictionary, you get a
non-mutable NSDictionary.
-Ken
On Fri, Mar 12, 2010 at 3:23 PM, Paul Sanders <email@hidden>wrote:
> Just a heads-up to say that when I created an NSMutableDictionary on the
> main thread and then tried to mutate it in a subthread, Snow Leopard threw
> an exception ("trying to mutate a non-mutable object", or somesuch). I was,
> of course, protecting the mutable dictionary against reentrancy problems and
> the same code worked fine on Leopard and Tiger. I guess Apple think it's
> dangerous to let us play with the sharp toys...
>
> Paul Sanders
> _______________________________________________
>
> 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
>
_______________________________________________
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