Re: about NSThread crash
Re: about NSThread crash
- Subject: Re: about NSThread crash
- From: Chris(吴潮江) <email@hidden>
- Date: Wed, 24 Jun 2009 14:53:17 +0800
- Importance: Normal
On Jun 24, 2009, at 2:28 AM, Ken Thomases wrote:
You probably don't need to use a background thread to do FTP. You can do
it using asynchronous methods on the main thread. Since you can, you
probably should. It's almost always less error prone and even more
efficient.
Considering the GUI operations, I use the background thread to do FTP.
How are you pausing and resuming the download?
As you said, through controlling this from the GUI, when user click the
pause button, I will stop receiving the data in the background and exit the
thread.
Doing it the "naive" way will get you in trouble.
In fact, In Windows platform, I control it successful with the same
methods.
Maybe it is really "naive" way in the Mac platform.
You should launch the program in the debugger, instead -- use Debug
instead of Run. That way, it will reliably show you the proper thread in
the event of a crash.
According to your suggestion, I will try to do it.
Thanks.
Regards,
Chris
_______________________________________________
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