• 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
Re: Killing a Thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Killing a Thread


  • Subject: Re: Killing a Thread
  • From: Scott Ribe <email@hidden>
  • Date: Tue, 25 Nov 2008 09:31:07 -0700
  • Thread-topic: Killing a Thread

> I'm new to thread programming. I need to kill the thread in a void function.

Let the function end. It's that simple.

> How can I do this?

You can't just kill a thread. You can let the function return when it's
finished. You can arrange some way to signal it to exit, and have it return
when it sees the signal (and this includes the POSIX function to "kill" a
thread). But there is no function to simply terminate one thread from
another, because there is NO WAY to create a function to do that safely.

--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


_______________________________________________

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

  • Follow-Ups:
    • Re: Killing a Thread
      • From: "Michael Ash" <email@hidden>
References: 
 >Re: Killing a Thread (From: Mahaboob <email@hidden>)

  • Prev by Date: Re: Testing apps on 10.*
  • Next by Date: Re: Testing apps on 10.*
  • Previous by thread: Re: Killing a Thread
  • Next by thread: Re: Killing a Thread
  • Index(es):
    • Date
    • Thread