1 #import "ITThreadChild.h"
3 @implementation ITThreadChild
5 + (void)runWithPorts:(NSArray *)portArray {
6 NSAutoreleasePool *pool;
7 NSConnection *parentConnection;
10 pool = [[NSAutoreleasePool alloc] init];
12 parentConnection = [NSConnection connectionWithReceivePort:[portArray objectAtIndex:0] sendPort:[portArray objectAtIndex:1]];
14 childObject = [self alloc];
15 if ([(id <ITThreadParent>)[parentConnection rootProxy] registerThreadedChild:childObject]) {
16 [[NSRunLoop currentRunLoop] run];
19 [childObject release];