• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using NSThreads in command-line apps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using NSThreads in command-line apps


  • Subject: Re: Using NSThreads in command-line apps
  • From: "Hamish Allan" <email@hidden>
  • Date: Fri, 16 May 2008 00:06:06 +0100

On Thu, May 15, 2008 at 11:40 PM, ben syverson <email@hidden> 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
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Using NSThreads in command-line apps (From: ben syverson <email@hidden>)
 >Re: Using NSThreads in command-line apps (From: Bill Bumgarner <email@hidden>)
 >Re: Using NSThreads in command-line apps (From: ben syverson <email@hidden>)
 >Re: Using NSThreads in command-line apps (From: Bill Bumgarner <email@hidden>)
 >Re: Using NSThreads in command-line apps (From: ben syverson <email@hidden>)
 >Re: Using NSThreads in command-line apps (From: "Hamish Allan" <email@hidden>)
 >Re: Using NSThreads in command-line apps (From: ben syverson <email@hidden>)

  • Prev by Date: Re: Using NSThreads in command-line apps
  • Next by Date: Re: Guidance for Cocoa's steep learning curve
  • Previous by thread: Re: Using NSThreads in command-line apps
  • Next by thread: Re: Using NSThreads in command-line apps
  • Index(es):
    • Date
    • Thread