Students in yoga classes sometimes believe they should stay in an asana (pose) until the teacher says to come out. Maybe you have been fortunate enough to hear a yoga teacher say something to the effect of, "Know that you can come out of any pose, at any time, for any reason." You may not believe it, but it's true! If you're watching your own experience, be it the body, the breath, or the mind you will know when to come out. There may be a little (or a large) internal debate, but acting on one's desire to stop is usually much more valuable than "toughing it out."
The first of the eight limbs of Yoga in Sri Patanjali's Yoga Sutras, Yama (containment of our human impulses) begins with Ahimsa, non-violence. You can also think of this as gentleness, kindness, and respect. And the practice of these qualities begins with oneself. So, when you notice any aspect of the asana deteriorating, ask yourself, "Can I fix this?" It may be the body losing organization, the breath not flowing, or the mind running amok (including noticing that your pose is better, or worse than that of another student). Caring enough to inquire is yoga. There have been numerous articles written about the dangers of yoga. Did you know that most yoga injuries occur in coming out of asana, probably after pushing oneself to stay there too long? With this in mind, it is a good idea to consider, before entering any pose, how to exit. If the teacher has not shown you, ask! It's likely you are practicing yoga to feel better, not to win a yoga-thon. You will come out of the pose at some point, yes? So, why not come out when the time is right for you?