• 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: scheduling a block from a render callback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scheduling a block from a render callback


  • Subject: Re: scheduling a block from a render callback
  • From: Paul Davis <email@hidden>
  • Date: Wed, 08 Jan 2014 09:23:16 -0500




On Wed, Jan 8, 2014 at 2:38 AM, Ian Kemmish <email@hidden> wrote:

Being an old codger, I occasionally find myself saying things like that - until I remember that these days, I'm very unlikely to end up running code on a single-CPU machine :-)  Polling isn't as wasteful as it used to be.

If you are polling, then a single byte variable accessible to both threads is even simpler than a fifo, of course.

My synth needs the real-time thread to co-ordinate with a memory allocator running in a separate thread, which is also "urgent" and "relatively infrequent".  I use the macros in libkern/OSAtomic.h, which seem to be the lowest-overhead synchronisation primitives.  I can't remember offhand which of those are non-blocking, but there's documentation somewhere....

none of those will serve to actually wake another thread, however. so if you use them, you have to ensure that the other thread is waking regularly via some other mechanism and checking whether it has work to do. which approach  works best depends on the precise situation.
 
 _______________________________________________
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: scheduling a block from a render callback (From: Ian Kemmish <email@hidden>)

  • Prev by Date: Re: audiograph 5ms fade
  • Next by Date: RE: scheduling a block from a render callback
  • Previous by thread: Re: scheduling a block from a render callback
  • Next by thread: Re: scheduling a block from a render callback
  • Index(es):
    • Date
    • Thread