Skip navigation.
 
mlUsing NSThreads in command-line apps
FROM : ben syverson
DATE : Thu May 15 20:42:04 2008

Hi all,

I have a bit of a dilemma. I'm working on a Foundation-based command-
line utility that needs to manage a few threads. The obvious choice is 
NSThread, since it's nice and clean.

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)?

Thanks!

- ben

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