• 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: 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


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>)
 >Re: best practices for sending data from UI to RemoteIO callback thread (From: Paul Davis <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: Paul Davis <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: Paul Davis <email@hidden>)
 >Re: best practices for sending data from UI to RemoteIO callback thread (From: Kyle Sluder <email@hidden>)
 >Re: best practices for sending data from UI to RemoteIO callback thread (From: Paul Davis <email@hidden>)
 >Re: best practices for sending data from UI to RemoteIO callback thread (From: Kyle Sluder <email@hidden>)

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