On Aug 6, 2010, at 19:25, Carter R. Harrison wrote:

> The call I'm making to establish the 2nd thread is: 
> 
> [self performSelectorInBackground:@selector(executeQueryHelper:) 
> withObject:[myMutableDictionary mutableCopy]];
> 
> That selector runs a whole lot of stuff that I know performs solidly when it 
> runs by itself in the main thread, and that selector also cretes its own 
> NSAutoReleasePool and then drains it at the end of the method.  I opted to 
> make a mutable copy of the dictionary that is passed into the 2nd thread in 
> hopes to reduce any concurrency problems with the shared variable but that 
> didn't seem to make any difference.

It seems very likely that your hopeful attempt to "reduce any concurrency 
problems" failed.

Since your app crashed trying to dispose of an array (or, specifically, trying 
to dispose the contents of an array as a result of disposing of the array), the 
problem probably isn't in the copied mutable dictionary itself. The most likely 
cause of a crash in such a scenario is that you've forgotten that 'mutableCopy' 
is a shallow copy of the dictionary, not a deep copy, so you just moved the 
threading issue from the dictionary to its contents.

That's just a guess, though.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to