Someone might point out that this entire series is about unproductive discussions, that the reason to end a discussion because of aggressive behaviour or prejudice is just ending and unproductive exchange, and that is true. Supposing though that you have gotten into a discussion where the participants are respectful and everything goes well, but the discussion starts to feel like a marathon after a while. If it is someone you know in person you keep bringing it up and if it is written or online you keep coming back for more comments and it spans multiple days, even weeks. We've all seen these types of discussions happening usually between two people with other people falling in but losing interest after a while.
+Pristine S. aptly describes these kinds of discussions as wars of attrition. It seems like nobody is getting anywhere. It seems like ending the discussion will leave the topic unresolved but carrying on will get you nowhere. Well... I have come to free you from your suffering. You may end this discussion. It doesn't mean you are conceding anything. It doesn't mean that the issue will never be resolved. How do you know when to stop though?
There are signs of discussions that are stuck. If you keep explaining something to someone but they just can't understand it, or if they keep explaining something to you and you can't quite get it, that is a sign that you should stop. If the other person seems like they are with you and then circle straight back to something they said earlier, or they keep getting back to the initial point it might be a time to stop. If you fail to explain something to someone twice it is quite safe to assume that the third attempt probably won't do the trick. There are ways to get a discussion unstuck, and I don't advocate for jumping ship at every possible opportunity. If you and the other person feel that there is a lot to be gained by carrying on then there is reason to salvage it. If that fails then ending it can be a good idea.
Ending a discussion is not about ending the interaction with a person. It is about improving communication by not ruining it. If you don't end discussions like these you may find yourself getting frustrated and becoming mean. If you've ever had to teach somebody something you know well and they were new at, you know the feeling. The best way to end these kinds of discussions is to make the problem clear. Personally I tell the other person that progress is too slow and it might make sense to stop. Give them an opportunity to give you a resource, like a book,video, article or wikipedia page and in turn they can do the same. Be honest about your time, so if you ask for something like that honestly go and consume the resource they provide. If you don't have time or enough interest to put into their resource then let them know. Maybe there is a more convenient resource they can offer. In turn give a resource to them.
Besides pointing to outside resources participants need time to think. Some ideas are genuinely hard to understand and need time to sink in. Expecting someone to immediately grasp your point of view in a single discussion is unrealistic. You are not the only person who reflects on things people say, and people will generally think about what happened in a discussion. If you met them somewhere random it may be a good idea to establish a method of contact and to make yourself available for questions and ask the same of them. Additionally, when we spend a lot of time in a discussion, we often think of ways to respond instead of trying to understand the concepts offered by the other person. Some ideas are like pudding, they need to set in the fridge overnight. Some ideas are like seedlings that need to grow over a period of time. We need to be accepting of how slow the transfer of an idea can be, and not rush our discussions as if they are the sum total of discourse.