Re: Implementing async notifications
Re: Implementing async notifications
- Subject: Re: Implementing async notifications
- From: Sixten Otto <email@hidden>
- Date: Fri, 10 Dec 2010 16:57:41 -0500
On Fri, Dec 10, 2010 at 2:50 PM, Jon Sigman <email@hidden> wrote:
> I have a Cocoa app that uses a dedicated thread to receive messages, and I
> would
> like that thread to post those messages as notifications so they can be
> processed asynchronously, outside my receiving loop (but not on the main
> thread).
>
Can you explain a little more about your reasons for using notifications?
Are you trying to publish the information about the incoming messages to
multiple specific things in your app?
It kind of reads to me like you're just trying to get the processing of the
messages out of the receiver thread, and into *some* other background
thread, which makes me think that maybe using a dispatch queue would be a
better solution. (Then you can let GCD handle all of the thread management.)
Sixten
_______________________________________________
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