ntention to divorce one’s wife: Is it regarded as an effective divorce?

Husband swearing to divorce his wife if his host slaughters an animal for him, and the host does it