Re: Using NSThreads in command-line apps
Re: Using NSThreads in command-line apps
- Subject: Re: Using NSThreads in command-line apps
- From: Bill Bumgarner <email@hidden>
- Date: Thu, 15 May 2008 11:47:23 -0700
On May 15, 2008, at 11:42 AM, ben syverson wrote:
Actually, I'm able to spawn new threads perfectly well. The problem
is that I can't (?) use performSelectorOnMainThread: because I'm not
an NSApplication, and so I don't get the default "main" thread that
loops for user input...
Am I busted? I would like to be able to run this app without the
window server running (ie, in Single User Mode), because it's server
software.
I can always fall back to POSIX threads, but I'd rather use NSThread
if possible. Is there an alternate way to have my spawned NSThreads
call back to a controller thread (that doesn't require 10.5)?
Run an NSRunLoop on your main thread. That'll support -
performSelectorOnMainThread:.
b.bum
_______________________________________________
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