Re: Block until block is called
Re: Block until block is called
- Subject: Re: Block until block is called
- From: Andreas Grosam <email@hidden>
- Date: Sat, 27 Aug 2011 09:13:18 +0200
On Aug 27, 2011, at 7:36 AM, Brian Norh wrote:
> On Sat, Aug 27, 2011 at 7:07 AM, Glenn L. Austin <email@hidden> wrote:
>
>> Um, why would you want to (or need to) do that?
>
> It's often not necessary at all but I've found a very rare case where
> if the API is called from within another block it sometimes makes
> sense to do that, at least for now until the API is updated.
>
> Brian
Uhm, if the reason for this rare case is to avoid race conditions, you should rethink your design ;)
Your design is OK if you have no race conditions, at any legal usage of your API. Of course, you could say "This API is not thread safe and can be used only from the main thread." However, this would be a rather harsh limitation._______________________________________________
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