• 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: Tue, 14 Jan 2014 11:27:59 -0500




On Tue, Jan 14, 2014 at 11:12 AM, Kyle Sluder <email@hidden> wrote:
 and the realtime thread(s)"), then this is a useful technique.

Given how frequently this comes up, I'm starting to wonder if there
shouldn't be API for this.

There is an API for it :)

The problem is lack of knowledge about how to use the API(s) that exist already, combined with programmer reluctance to use NonCamelCase APIs, combined with Apple reluctance (Doug notably excluded) to recommend using NonCamelCase APIs.

Besides that, your API design assumes quite a few things that are not assuredly the common case. The idea that the notification wants a particular function/handler executed is the most basic one. Good design here separates the notification from "what happens when something gets the notification". Consider a sort of basic case that I deal with all the time: the realtime thread notices that the disk data buffers are running low (on space or data) and would like to make sure that whoever takes care of that knows that it should get busy. In my case, the thread(s) that will care may already be busy doing disk i/o or other stuff, and the work of "fixing" the situation will be (necessarily) interleaved among their other responsibilities. With the sort of design that you're suggesting, the "handler" function is nothing more than another forwarding agent that just adds overhead to the notification process.
 _______________________________________________
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

  • Follow-Ups:
    • Re: scheduling a block from a render callback
      • From: Kyle Sluder <email@hidden>
References: 
 >scheduling a block from a render callback (From: Lucas Ives <email@hidden>)
 >RE: scheduling a block from a render callback (From: Tim Dorcey <email@hidden>)
 >Re: scheduling a block from a render callback (From: Paul Davis <email@hidden>)
 >RE: scheduling a block from a render callback (From: Tim Dorcey <email@hidden>)
 >Re: scheduling a block from a render callback (From: Doug Wyatt <email@hidden>)
 >Re: scheduling a block from a render callback (From: Paul Davis <email@hidden>)
 >Re: scheduling a block from a render callback (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: scheduling a block from a render callback
  • 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