title: .NET - Is the Queue.Enqueue method thread safe?
body: <p>Let's say that I have a module that has a Queue in it.</p>
  
  <p>For other entities to Enqueue, they must go through a function:</p>
  
  <pre><code>public sub InsertIntoQueue(Obj)
      MyQueue.Enqueue(Obj)
  end sub
  </code></pre>
  
  <p>If I have multiple threads running and they want to call InsertIntoQueue(), is this considered thread safe?</p>
  
  <p>I am under the impression that there is only one copy of the instructions in memory necessary to perform the InsertIntoQueue() function... which would lead me to think that this is thread safe.</p>
  
  <p>However, I wonder what happens when two threads attempt to run the function at the same time?</p>
  
  <p>Is this thread safe, and if not, how can I make it thread safe?  (and What would be the performance implications regarding speed and memory usage)</p>