Re: best practices for sending data from UI to RemoteIO callback thread
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