• 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: Run Loops and CFMessagePorts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run Loops and CFMessagePorts


  • Subject: Re: Run Loops and CFMessagePorts
  • From: Kurt Revis <email@hidden>
  • Date: Wed, 1 Mar 2006 00:00:58 -0800

On Feb 28, 2006, at 12:44 PM, Doug Wyatt wrote:

If you send Mach messages via CFMessagePort or directly using Mach, you'll want to avoid sending a lot of messages, or you can block on the sending side.

IIRC you can send the message with a timeout value of 0. This means that if the receiving port's queue is full, you'll get a timeout error code returned immediately, instead of blocking.


If all you're doing is signaling the consumer of a queue, this behavior is pretty handy. If the send succeeds you're fine; the waiting thread will get the message eventually. If it times out immediately, you're fine too -- someone must have already sent a message earlier, and the waiting thread just hasn't woken up yet. As long as it processes all its available work when it does wake up, all is well.

--
Kurt Revis
email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Next by Date: Re: deactivating device for debugging
  • Next by thread: Re: deactivating device for debugging
  • Index(es):
    • Date
    • Thread