allow to stop algorithm when it run and we can close application even if an algorithm is running