• 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(2): Giving time for async notifiers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re(2): Giving time for async notifiers


  • Subject: Re(2): Giving time for async notifiers
  • From: Steve Sisak <email@hidden>
  • Date: Fri, 8 Feb 2002 22:42:07 -0500

At 1:03 AM +0100 2/9/02, Jens Bauer wrote:
On Thu, 7 Feb, 2002, Eric Gundrum <email@hidden> wrote:
>--- At 6:09 PM +1100 2/7/02, Richard.Fox wrote:
Is there a way that I can pause my
processing to give time for notifiers to fire? At the moment we use
>>WaitNextEvent (which also gives time to the GUI).

>If you are concerned your app might not respond to the incoming packets
fast enough, you can have your notifier awaken your app. I don't recall the
routine to do this, but it should be obvious from Processes.h or the docs
on the Process Manager. (If you cannot find it, drop me a note and I'll
look it up.)

Earlier I got the idea that you could post a null-event from the
notifier, however, I do not know if it is legal to do so

It's not.

The call you want is WakeUpProcess() -- note the you want to pass it a real process ID (not kCurrentProcess) -- this will terminate your sleep time and feed you a null event next time around.

If you're using cooperative threads you may also want to call SetThreadReadyGivenTaskRef() to wake up your thread.

Both of these calls are interrupt safe.

NOTE: If you (or any of your potential customers) use Jasik's Debugger (the only thing that will source-level debug interrupt code), make sure _ProcessDispatch is implemented before calling any process manager functions, such as GetCurrentProcess() or WakeUpProcess() -- if your interrupt fired inside The Debugger, it won't be and you'll be sorry.

HTH,

-Steve
--
_________________________________________________________________________
Steve Sisak, CTO email@hidden
IOXperts, Inc. voice: +1 617 876-2572
87 Bristol St #3A fax: +1 617 876-2337
Cambridge, MA 02139 mobile: +1 617 388-6476
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re(3): Giving time for async notifiers
      • From: Jens Bauer <email@hidden>
References: 
 >Re: Giving time for async notifiers (From: Eric Gundrum <email@hidden>)
 >Re(2): Giving time for async notifiers (From: Jens Bauer <email@hidden>)

  • Prev by Date: Re(2): Giving time for async notifiers
  • Next by Date: Re(2): Name resolution limits
  • Previous by thread: Re(2): Giving time for async notifiers
  • Next by thread: Re(3): Giving time for async notifiers
  • Index(es):
    • Date
    • Thread