On Nov 8, 2009, at 12:11 PM, Stuart Malin wrote:

But I suspect that from the posters comments in the post I reference below, it isn't a bug. The problem is, you can't return up the calling chain while being synchronized. Do whatever work it is that needs to be performed in a synchronized way, then return whatever result needs to be returned.

No, that's not true. It's safe to return out of an @synchronized block. It's conceptually the same as a local C++ object whose destructor fires whenever the block exits.

As Clark said, the warning is simply due to a bug in the compiler's control-flow analysis — it doesn't realize that it's safe for the function not to have a 'return' on its last line.

—Jens_______________________________________________

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