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

Re: Sleeping and waking NSThread


  • Subject: Re: Sleeping and waking NSThread
  • From: Shawn Erickson <email@hidden>
  • Date: Mon, 21 Jun 2004 10:22:28 -0700

On Jun 21, 2004, at 9:25 AM, Mark Alldritt wrote:

Hi,

I have a need to make a thread sleep until a reply arrives for an
AppleEvent. I can see how to make NSThread sleep with sleepUntilDate: with
a sufficiently long expiration, but I cannot see a call that will wake a
thread up again. Does anyone know how this is done?

You likely want to block the thread on a lock of some type (NSConditionLock possibly) or connect up a event source with a run loop (NSRunloop) running in that thread, etc.

Anyway how are you sending the AppleEvent? How are you setup to get a reply back?

Depending on what you have it can affect what would be the best method.

-Shawn
_______________________________________________
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: Sleeping and waking NSThread
      • From: Mark Alldritt <email@hidden>
References: 
 >Sleeping and waking NSThread (From: Mark Alldritt <email@hidden>)

  • Prev by Date: Re: Sleeping and waking NSThread
  • Next by Date: Re: / bar graphics /
  • Previous by thread: Re: Sleeping and waking NSThread
  • Next by thread: Re: Sleeping and waking NSThread
  • Index(es):
    • Date
    • Thread