title: Running method while destroying the object
body: <p>A few days ago my friend told me about the situation, they had in their project.
  Someone decided, that it would be good to destroy the object of <code>NotVerySafeClass</code> in parallel thread (like asynchronously). It was implemented some time ago.
  Now they get crashes, because some method is called in main thread, while object is destroyed.
  Some workaround was created to handle the situation.</p>
  
  <p>Ofcourse, this is just an example of not very good solution, but still the question:</p>
  
  <p>Is there some way to prevent the situation internally in <code>NotVerySafeClass</code> (deny running the <code>methods</code>, if <code>destructor</code> was called already, and force the <code>destructor</code> to wait, until any running <code>method</code> is over (let's assume there is only one <code>method</code>))?</p>