osx trying to change thread closing outside of deconstructors. Not totally successfull