> The application is not crashing, but the thread is not exiting. From UI I'm
> giving a time interval say 10sec is set for the time interval between emails
> to be send. At the first time when I'm clicking the button to send email,
> the thread is getting called and is working fine and sends email to all
> email id's with a time interval of 10Sec. After that the thread is not exit
> and invokes the thread in every 10Sec. So when I'm button second time, the
> application get hanged, all windows and buttons get disabled and I can quit
> the application from debugger only.

1) If the thread is not exiting, then your function that you call on that
thread never completes, and you need to figure out why it doesn't.

Or 2) Or maybe it does complete, but without releasing a lock that it took.
You see, even if the thread didn't exit, that by itself would not cause a
hang when you try to create a new thread for the same function. In the
absence of locking in your code, you could create many many threads all
running the same function.

Or 3) You don't have explicit locking code of your own, but you're calling
code that does, and as in 1, the function you're calling never completes and
returns, thus holding a lock on some shared resource.

Impossible to say which without more information, but the solution is
absolutely NOT a "kill_thread" function.

-- 
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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