> You create the secondary thread, install the event tap in it as usual - that 
> is, create a run loop source for the tap and add the source to the current 
> run loop returned by CFRunLoopGetCurrent() - and then, erhm, run the run loop 
> in a loop :-)
>
> Something like (warning: typed in Eudora):
>        while (someCondition) {
>                NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
>                SInt32 result =  
> CFRunLoopRunInMode(kCFRunLoopDefaultMode,0.5,YES);
>                [pool drain];
>                if (result==kCFRunLoopRunStopped)) {
>                        return;
>                }
>        }
> should work.
>
> HTH,
> --

Hello Rainer
Thanks for the tip
Why did you give 0.5 as the second param of CFRunLoopRunInMode? Is it
the optimal value?
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to