• 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: Exiting NSThread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exiting NSThread


  • Subject: Re: Exiting NSThread
  • From: Dustin Mierau <email@hidden>
  • Date: Sat, 29 Sep 2001 13:27:16 -0700

Right, but what if:

connect_to_host(IP,port);

while(1)
{
read_data_for_a_long_long_long_time();
}

disconnect();

If the thread is just cleaned up for me, how do I ever disconnect?

-dustin

Dustin,

Dustin Mierau (DM) wrote at Sat, 29 Sep 2001 11:32:28 -0700:
DM> Now before this while loop I setup an NSConnection with the main
DM> thread. So now my app wants to quit and this thread is in this
DM> while loop, I want to tell the thread to exit, what is the best
DM> way to do this?

Just exit the application -- all its threads will be killed automatically.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


  • Follow-Ups:
    • Re: Exiting NSThread
      • From: Ondra Cada <email@hidden>
References: 
 >Re: Exiting NSThread (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Exiting NSThread
  • Next by Date: Re: Exiting NSThread
  • Previous by thread: Re: Exiting NSThread
  • Next by thread: Re: Exiting NSThread
  • Index(es):
    • Date
    • Thread