Skip navigation.
 
mlRe: Using NSThreads in command-line apps
FROM : Hamish Allan
DATE : Fri May 16 01:06:06 2008

On Thu, May 15, 2008 at 11:40 PM, ben syverson <<email_removed>> wrote:

> I know it's kevent "style," but unless it's actually kevent (or a similar
> kernel-level event system) under there, I have my doubts about the
> performance under heavy load. I guess I could (should) do benchmarks of both
> versions. But kqueue is working great so far, so I'll probably leave any
> benchmarking & Sharking until after the rest of development is done...


Well, if all you want to do is to set up your run loop so that it will
run without any inputs or timers:

NSPort *dummyPort = [[NSPort port] retain];
[[NSRunLoop currentRunLoop] addPort:dummyPort forMode:@"NSDefaultRunLoopMode"];

But why do you want to perform a selector on the "main" thread rather
than on the thread with your main event loop?

Hamish

Related mailsAuthorDate
mlUsing NSThreads in command-line apps ben syverson May 15, 20:42
mlRe: Using NSThreads in command-line apps Bill Bumgarner May 15, 20:47
mlRe: Using NSThreads in command-line apps Randall Meadows May 15, 20:49
mlRe: Using NSThreads in command-line apps Uli Kusterer May 15, 20:51
mlRe: Using NSThreads in command-line apps Jens Alfke May 15, 20:52
mlRe: Using NSThreads in command-line apps ben syverson May 15, 21:16
mlRe: Using NSThreads in command-line apps ben syverson May 15, 21:17
mlRe: Using NSThreads in command-line apps Bill Bumgarner May 15, 21:25
mlRe: Using NSThreads in command-line apps Bill Bumgarner May 15, 21:31
mlRe: Using NSThreads in command-line apps ben syverson May 15, 21:53
mlRe: Using NSThreads in command-line apps Jens Alfke May 15, 23:17
mlRe: Using NSThreads in command-line apps ben syverson May 16, 00:28
mlRe: Using NSThreads in command-line apps Sherm Pendley May 16, 00:31
mlRe: Using NSThreads in command-line apps Hamish Allan May 16, 00:33
mlRe: Using NSThreads in command-line apps ben syverson May 16, 00:40
mlRe: Using NSThreads in command-line apps Hamish Allan May 16, 01:06
mlRe: Using NSThreads in command-line apps Jens Alfke May 16, 03:02
mlRe: Using NSThreads in command-line apps ben syverson May 16, 06:50