• 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: how to stop a thread that's in a blocking call from the main thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to stop a thread that's in a blocking call from the main thread


  • Subject: Re: how to stop a thread that's in a blocking call from the main thread
  • From: "Shawn Erickson" <email@hidden>
  • Date: Wed, 29 Nov 2006 15:06:57 -0800

On 11/29/06, Xavi Caballé <email@hidden> wrote:
Hello,

I start a new thread using NSThread's class method
detachNewThreadSelector:toTarget:withObject:
The new thread  calls a library function that reads data from a socket
(the library is the Stomp protocol C client library). This function is
blocking.
I need  to stop this new thread immediately when the users asks it by,
for example, clicking a button, so I need to stop that thread from the
main thread. Which is the simplest way to do that?

In this case likely close the socket it is listening on.

-Shawn
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: how to stop a thread that's in a blocking call from the main thread
      • From: John Stiles <email@hidden>
References: 
 >how to stop a thread that's in a blocking call from the main thread (From: "Xavi CaballĂ©" <email@hidden>)

  • Prev by Date: Re: Re: NSTask interactive question
  • Next by Date: Re: how to stop a thread that's in a blocking call from the main thread
  • Previous by thread: how to stop a thread that's in a blocking call from the main thread
  • Next by thread: Re: how to stop a thread that's in a blocking call from the main thread
  • Index(es):
    • Date
    • Thread