• 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
Terminating a blocked NSThread from outside
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Terminating a blocked NSThread from outside


  • Subject: Terminating a blocked NSThread from outside
  • From: Julian Barkway <email@hidden>
  • Date: Tue, 23 Apr 2002 21:49:12 +0200

Today's question: ;-)

I have an NSThread which is blocked waiting on a BSD Socket and I would obviously like to give the user some way out of the block. Since the thread is, presumably, sitting in a tight loop somewhere deep in the depths of the kernel, synchronous thread I/O is out of the question. Is there a way of sending the thread a SIGINT or a SIGTERM to give it a kick up the backside, so to speak? (Unfortunately, for various reasons, asynch access to the socket is not possible).

I've checked the NSThread docs but it appears there's no way, using the Cocoa API, to do this except from within the thread itself. [NSThread exit] just kills the current thread - in my case the main task! Obviously, this is not desirable behaviour.

I guess I'm hoping somebody has a clever hack up their sleeve....

Thanks for any help!

Cheers,
Julian.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Terminating a blocked NSThread from outside
      • From: Cryx <email@hidden>
  • Prev by Date: What is NSRuleBook and why to I get exceptions ?
  • Next by Date: Hiding the menubar and the dock?
  • Previous by thread: Re: How to validate the Undo menu item?
  • Next by thread: Re: Terminating a blocked NSThread from outside
  • Index(es):
    • Date
    • Thread