• 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: Threading Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threading Question


  • Subject: Re: Threading Question
  • From: Robert Chin <email@hidden>
  • Date: Mon, 13 Feb 2012 10:29:41 -0800

On Mon, Feb 13, 2012 at 8:14 AM, Michael Tyson <email@hidden> wrote:
> Usually, I most definitely stick with tried-and-true, but in this case, oddly, I couldn't find a circular buffer implementation that I was happy with.

If all you need is one reader and you just need to pass messages and
don't need any of the special behaviors associated with a circular
buffer, you can also use a linked list and the existing
CAAtomicStack::push_atomic() and CAAtomicStack::pop_all_reversed().

I haven't actually tested the difference, but it has the theoretical
advantage over OSAtomicFifoEnqueue in that OSAtomicFifoEnqueue relies
on a PFZ code page (some more info at
http://www.opensource.apple.com/source/xnu/xnu-1504.7.4/osfmk/i386/commpage/fifo_queues.s),
although I would guess in the real world there is likely to be little
downside to using the built in OS call for most cases.

Robert
 _______________________________________________
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


References: 
 >Re: Threading Question (From: Morgan Packard <email@hidden>)
 >Re: Threading Question (From: Kyle Sluder <email@hidden>)
 >Re: Threading Question (From: Michael Tyson <email@hidden>)
 >RE: Threading Question (From: email@hidden)
 >Re: Threading Question (From: Michael Tyson <email@hidden>)
 >Re: Threading Question (From: Kyle Sluder <email@hidden>)
 >Re: Threading Question (From: Michael Tyson <email@hidden>)

  • Prev by Date: Core MIDI thread safety
  • Next by Date: Re: Getting Started with Core Audio ???
  • Previous by thread: Re: Threading Question
  • Next by thread: Re: Threading question
  • Index(es):
    • Date
    • Thread