Re: Notification handling without run loop of a primary thread
Re: Notification handling without run loop of a primary thread
- Subject: Re: Notification handling without run loop of a primary thread
- From: "Vladimir Magaziy" <email@hidden>
- Date: Sat, 3 Dec 2005 01:02:50 +0200
Hi Brian,
Thanks for so quick reply.
> The run loop needs an event source or it will just exit (as you
> witnessed). So, before calling CFRunLoopRun() you should register
> your notification handler with the run loop.
I noticed that when I add a notification observer in a primary
thread using the CFNotificationCenterAddObserver the run
loop works correctly without any source and CFRunLoopRun
does not return a control, this in turn adds some entries to a run
loop internal representation -- modes and current modes set
entries, this set does not contain any source!:
CFShow(CFRunLoopGetCurrent()), but if I do
the same in a separate thread an internal run loop set contains
appropriate entries, but its behavior are not the same.
As I get, this is the one mechanism to register notification
handler with a run loop.
Would you please suggest me how should I initialize
a run loop source you mentioned? Moreover, I have
no idea about an infill of its context (I mean
CFRunLoopSourceContext structure).
Thanks again.
Best regards,
Vladimir Magaziy.
_______________________________________________
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