Hi,
I have some problems when to using thread. As we all know, there is a method to 
create a thread,  
+ (void)detachNewThreadSelector:(SEL)aSelector toTarget:(id)aTarget 
withObject:(id)anArgument.
- (void)aSelector:(id)anArgument
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    //  Here I implement FTP functions. e.g. download/ pause download/ resume 
download file.
    [pool release];
    [NSThread exit];
}
To my surprise, when downloading a file, I pause download and no error display. 
Then I resume to download file,
it's ok. However, at this time I pause download file, there will be a error 
showing EXC_BAD_ACCESS and the stack
information is:
mach_msg_trap
mach_msg
CFRunLoopRunSpecific
CFRunLoopRunInMode
RunCurrentEventLoopInMode
ReceiveNextEventCommon
BlockUnitlNextEventMatchingListInMode
_DPSNextEvent
_[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
_[NSApplication run]
NSApplicationMain

I don't know why? 
Please tell me the reason if anyone knows.
Thanks.
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to