• 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: Michael Tyson <email@hidden>
  • Date: Mon, 13 Feb 2012 10:43:41 +0100

Hopefully I've managed to fix the dumb that Michael pointed out in TPCircularBuffer =)

Incidentally, this is how I'm using it to avoid locking from my realtime core audio thread. It uses two ring buffers, one that contains messages for the realtime thread to process, and one that contains responses from the realtime thread, both of which are polled by their respective threads.  Two utility methods provide synchronous and asynchronous (with a block argument for reply processing) message-response exchange.

https://gist.github.com/1815496


-- 
Michael Tyson | atastypixel.com
A Tasty Pixel: App artisans

Latest news: Loopy HD wins 2nd place in the 2011 Best App Ever Awards for Best Musicians App!

Find us on Facebook, and Twitter
Subscribe to our newsletter

aim: mikerusselltyson
twitter: MichaelTyson

On 13 Feb 2012, at 02:55, Morgan Packard wrote:

I'd be very grateful for a ring buffer I can trust for communication from one thread to another.
-Morgan

 _______________________________________________
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: Threading Question
      • From: Michael Tyson <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: Morgan Packard <email@hidden>)

  • Prev by Date: Re: Threading Question
  • Next by Date: Re: Max simultaneous source count with Remote I/O Callback much lower than with OpenAL
  • Previous by thread: Re: Threading Question
  • Next by thread: Re: Threading Question
  • Index(es):
    • Date
    • Thread