Can anything prevent dispatch_async() from executing its block?
Can anything prevent dispatch_async() from executing its block?
- Subject: Can anything prevent dispatch_async() from executing its block?
- From: Rick Mann <email@hidden>
- Date: Wed, 30 Jan 2013 01:01:04 -0800
Ah! Just as I sent that email I realized what it is. It's a unit test, so there's no run loop. So the async block never gets called (the main code path returns before it gets a chance).
So, my real question is: how do I unit test dispatch_async()? Time to Google…
---------
I have some code that calls dispatch_async(). It's called on the main thread and dispatches to the main thread. The dispatch happens and the calling code returns, but the block is never called.
Is there any condition that might cause that to be the case?
This is happening in a unit test target in a Cocoa app.
--
Rick
_______________________________________________
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