• 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: best practices for sending data from UI to RemoteIO callback thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: best practices for sending data from UI to RemoteIO callback thread


  • Subject: Re: best practices for sending data from UI to RemoteIO callback thread
  • From: Paul Davis <email@hidden>
  • Date: Sat, 26 Mar 2011 17:29:50 -0400

On Sat, Mar 26, 2011 at 5:25 PM, Morgan Packard
<email@hidden> wrote:
> So, after looking at your code, looks like the only piece data shared
> by the producer and consumer is this hasCommand_ flag. Is it unsafe to
> even increment and decrement a shared value (meaning a value that more
> than one thread is writing to) without using these OSAtomicIncrement
> functions? Perhaps that may be the reason for the mysterious failures
> I get once in a blue moon.

it is never safe unless you know that re-ordered read/writes of the
value will cause no damage. there are cases where this is true;
generally, its false.
 _______________________________________________
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: best practices for sending data from UI to RemoteIO callback thread
      • From: Morgan Packard <email@hidden>
References: 
 >best practices for sending data from UI to RemoteIO callback thread (From: Morgan Packard <email@hidden>)
 >Re: best practices for sending data from UI to RemoteIO callback thread (From: Morgan Packard <email@hidden>)
 >Re: best practices for sending data from UI to RemoteIO callback thread (From: wm schauweker <email@hidden>)
 >Re: best practices for sending data from UI to RemoteIO callback thread (From: Morgan Packard <email@hidden>)

  • Prev by Date: Re: best practices for sending data from UI to RemoteIO callback thread
  • Next by Date: Re: best practices for sending data from UI to RemoteIO callback thread
  • Previous by thread: Re: best practices for sending data from UI to RemoteIO callback thread
  • Next by thread: Re: best practices for sending data from UI to RemoteIO callback thread
  • Index(es):
    • Date
    • Thread