• 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
killing NSThreads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

killing NSThreads


  • Subject: killing NSThreads
  • From: email@hidden
  • Date: Thu, 15 Aug 2002 23:51:07 +0200

I'm trying to kill a thread I've started but it seems that I don't really understand what the thread is named

[NSThread detachNewThreadSelector:@selector(copyData:)
toTarget:self withObject:handle];
//This starts the thread

the following is the method called.
- (void)copyData:(NSFileHandle*)handle {
NSAutoreleasePool *pool=[[NSAutoreleasePool alloc] init];
NSString *string=[[NSString alloc] initWithData:
[handle readDataToEndOfFile] encoding:NSASCIIStringEncoding];

[textview setString:string]; //sends the cmd line data to textview in window

[string release];
[pool release];
}

So what is the thead called?

if (![copyData isMultiThreaded]) {
NSLog(@"Application is multi threaded.");
}

result in the error of copyData as undeclared because its a method.
I'm a bit puzzeld here....

Erick
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Creating Menu Items from NSMutableArray
  • Next by Date: Re: How do you draw a single pixel line?
  • Previous by thread: Event handling in cocoa
  • Next by thread: Table grid lines won't draw
  • Index(es):
    • Date
    • Thread