title: boost::shared_ptr is it safe to use it in multiple threads?
body: <p>I was trying to find the answer for some time but I failed.</p>
  
  <p>Lets assume that we have a <code>shared_ptr</code> created from one thread. Then we pass this <code>shared_ptr</code> to another 2 threads (using some queue for example). So from this moment there are 2 copies of the original <code>shared_ptr</code>, pointing to the same raw pointer.
  Both owner threads will take their copies of this <code>shared_ptr</code> from the queue. Then they will pass it to another thread or will destroy it.</p>
  
  <p>Question is - is it safe? Will the raw pointer destroyed correctly (there will be no race to reference counter?)
  <img src="https://i.stack.imgur.com/0vPVM.jpg" alt="enter image description here"></p>