set bool to stop thread at deconstructor in case terminate is executed too late;