Re: CFNotificationCenter ./. NSNotificationCenter
Re: CFNotificationCenter ./. NSNotificationCenter
- Subject: Re: CFNotificationCenter ./. NSNotificationCenter
- From: email@hidden (Hado Hein)
- Date: Sat, 27 Feb 2010 14:26:26 +0100
- Organization: handmade !
Dave Keck <email@hidden> wrote:
> Future inquires regarding CF/Cocoa should be sent to Cocoa-dev.
>
> > Now I'm trying to get the data I received out of my thread.
> > I'm posting a CFNotification to the local center.
> >
> > CFNotificationCenterPostNotification(
> > CFNotificationCenterGetLocalCenter(), CFSTR("news"), NULL, nfodict,
> > false);
>
> Why are you using CFNotificationCenter to post the notification
> instead of NSNotificationCenter? This is probably what you want:
Scusa, the discription is in the prvious CFSocket Thread.
In a CoreFoundation (only framework linked to) CFPlugIn I do call the
CFNotificationCenterPostNotification (2nd Thread).
In a NSWindowController (main thread) I'm trying to receive.
...
>
> I'm betting you're not running the run loop in your secondary thread.
> Here's an example of how to use NSNotificationCenter to deliver a
> notification on a secondary thread:
The second thread also has a runloop. I'm aware of the excution in a
diffrent thread. Actually I'm not called anyway.
> > In two threads (in one application) do I need to use the distibuted
> > center?
> No - NSDNC should be reserved for IPC between separate processes. NSNC
> works fine for inter-thread communication.
Thanks, Hado.
--
Hado Hein (KSK, DTHG), master craftsman of stagecrafts, Berlin
sip +49.30.91688488
www.beleuchtungsbildner.de - Stage Lighting Directing
www.batchmaker.de - Stage Lighting Design, Control and Routing
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden