The only time a threat to leave is valid, IMO, is when there is a serious problem that is or will become a deal-breaker if not dealt with.
There are threats, and then there are threats.
It’s one thing to just threaten to leave in order to fuck with someone’s head, or to threaten to leave over petty disagreements.
It’s a whole ‘nuther ball of wax when critical issues are at stake, to then tell someone specifically that if X doesn’t happen, or if Y happens again, then you will leave, that that would become a deal-breaker, and that you wouldn’t be able to stay in the relationship at that point. That’s a warning that something is seriously wrong that you haven’t been able to resolve, and an alert that if resolution is not found, you will not be able to stay.
That’s called setting boundaries – and healthy boundaries are essential things to have in life and in relationships.
It’s then just a statement of fact, of what is true for you.
It may mean you’ve got one foot already out the door, but it may also mean that you don’t really want to leave at all, but you’ll have to if whatever the problem is continues. It’s a warning in that case, and a partner who values the relationship would do well to take it as a wake-up call that they are seriously fucking things up and attend to the issues in question if they want to keep their relationship.
Some things are just dealbreakers, and a threat to leave in the face of such is actually still offering the offender an opportunity to save things.