Re: Giving time for async notifiers
Re: Giving time for async notifiers
- Subject: Re: Giving time for async notifiers
- From: Eric Gundrum <email@hidden>
- Date: Thu, 7 Feb 2002 08:46:20 -0800
--- 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).
Richard,
The sleep value you specify for WaitNextEvent() will tell the OS to sleep
your app for that many ticks or until there is an event in the queue for
it. (That is, your app will be awoken to receive any events directed to
it.) You can give more time to other tasks by making the sleep value a
larger number, such as 60.
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.)
Regards...eric
_______________________________________________
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.