title: Why are some objects not accessible from different threads?
body: <p>I've come across this problem several times while developing in C#.  I'll be a happily coding along, passing objects to and fro between threads and what not, then all of a sudden I get this familiar error:</p>
  
  <blockquote>
    <p>"The calling thread cannot access this object because a different
    thread owns it."</p>
  </blockquote>
  
  <p>Well, ok, I've dealt with it before, especially with objects on the GUI thread.  You just have to write some extra code to program around that <strong>specific</strong> problem.  But every once in while I come across an object that is by all means ordinary, yet it doesn't like being accessed by different threads.  </p>
  
  <p><strong>EDIT</strong> I was mistaken in my original post about the object that was causing the access exception.  It was NOT <strong><a href="http://msdn.microsoft.com/en-us/library/system.net.ipaddress.address.aspx" rel="noreferrer">IPAddress</a></strong>, instead its <strong><a href="http://msdn.microsoft.com/en-us/library/system.printing.printqueue.aspx" rel="noreferrer">System.Printing.PrintQueue.</a></strong> which I was using to obtain the IP address.  This is the object that you can't assess from more than 1 thread. </p>
  
  <p>All my classes I've written never have this problem.  I don't even know how I'd implement this myself.  Would you have to keep a member variable with the thread ID that created you, and then check the current thread against that on every single property and method access?  That seems crazy.  Why would Microsoft decide that..... "OK... PrintQueue, definitely not sharable among threads.  But these other classes.... their good to go."</p>
  
  <p><strong>Why are some objects blocked from multiple thread access?</strong></p>