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: Brian Willoughby <email@hidden>
- Date: Sat, 26 Mar 2011 19:58:38 -0700
On Mar 26, 2011, at 19:42, Kyle Sluder wrote:
On Sat, Mar 26, 2011 at 7:12 PM, Paul Davis
<email@hidden> wrote:
i was referring to instruction reordering, which is not likely to
have
an impact on a given thread (unless the compiler has a bug, which is
not unknown but unlikely). however, instruction reordering does mean
that you can't reason about cross-thread interactions in a way
that is
based on a straightforward reading of the source code or even the
assembler in some cases.
Oh, right. So we're really talking about two different automatic
reorderings that can happen: the compiler can reorder your
instructions, and the CPU can reorder your memory accesses. Both spell
doom for trying to reason about arbitrary accesses to shared memory.
:)
The CPU can also reorder instructions, not just memory accesses, but
hopefully never in a way that would produce the wrong results. Some
processors may be more likely to record instructions that memory
accesses, particularly write accesses. Again, thread interaction can
be exceedingly tricky unless you take this possibility into account
and control it.
Brian Willoughby
Sound Consulting
_______________________________________________
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