Re: Kernel Events from Cocoa (Was Re: Detecting timezone changes?)
Re: Kernel Events from Cocoa (Was Re: Detecting timezone changes?)
- Subject: Re: Kernel Events from Cocoa (Was Re: Detecting timezone changes?)
- From: p3consulting <email@hidden>
- Date: Tue, 4 May 2004 15:15:31 +0200
define straightforward ;)
Since the "classic" kevent code:
memset(&ke, 0x00, sizeof(struct kevent));
/*
* do a blocking kevent call till something happens
*/
res = kevent(kq, NULL, 0, &ke, 1, NULL);
is blocking, it has to be done in a separate thread...
and then deliver the events to the main loop using
- (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg
waitUntilDone:(BOOL)wait
or any other message passing technique...
(lot of threads in this list regarding this particular topic).
Pascal Pochet
email@hidden
----------------------------------
PGP
KeyID: 0x208C5DBF
Fingerprint: 9BFB 245C 5BFE 7F1D 64B7 C473 ABB3 4E83 208C 5DBF
Le mai 4, 2004, ` 13:29, Nicko van Someren a icrit :
>
On a related note, is there a straightforward way to have kernel event
>
automatically picked up by a run loop and used to trigger a message to
>
an (Objective C) object?
>
>
Nicko
>
>
>
On 4 May 2004, at 09:24, p3consulting wrote:
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.