Lovely, thanks for the reassuring clarification, Mike. I've revised my implementation and it's working splendidly with blocks now.
(It's a mechanism I've build into my audio engine that allows me to synchronise between the Core Audio thread and other threads, without needing locks.) So:
- (void)performSynchronousMessageExchangeWithBlock:(void (^)())block;
- (void)performAsynchronousMessageExchangeWithBlock:(void (^)())block
responseBlock:(void (^)())responseBlock;
For sending messages to the Core Audio thread, and
void AEAudioControllerSendAsynchronousMessageToMainThread(AEAudioController *audioController,
AEAudioControllerMainThreadMessageHandler handler,
void *userInfo,
int userInfoLength);
for sending messages back to the main thread; both based upon a lock-free circular buffer.
Working very nicely now with blocks - a lot easier than what I was doing before, which was using a C function pointer and userInfo, like the third method above.