I had a big problem with this when I was younger and I still have problems with it sometimes now. For us, it's an issue of personal awareness and control. I've learned to ask myself - how long have I been talking? (I even resorted to discreetly timing myself and others for a while, just to get a sense of how long is appropriate.) Also, try to keep your focus on the other person. Look at them and watch for signs that they're no longer interested in listening, or have something of their own to say (avoiding eye contact, fidgeting, checking their watch, sighing, etc.). If you notice something like that, it's time to either pause for a few seconds to give them a chance to weigh in or change the subject, or else ask them a question to give them a chance to talk about themselves and their own interests.
Try to keep in mind: how long would you want to listen to someone talk about something that doesn't interest you before you would just walk away? Unfortunately we need to assume that what interests us does not interest other people, so more often than not this is a fair gauge. If you're having trouble, in all seriousness, pull up a video online of a person talking about something you don't care about. Watch it and pretend you're the other person in the conversation, and pretend you are interested. How long can you keep it up? However long that is, that's the longest you should be talking about something in a conversation without giving the other person a turn.
It's also a good exercise to practice writing concisely. Write out an essay or blog entry or what-have-you on your favorite topic. Then go back through it and summarize each paragraph in a single sentence. It forces you to choose the most important information and stay focused. With enough practice, it can help you with speaking as well.
It's easy to say "to hell with them, talk as long as you want and it's their problem." But in reality, it becomes your problem when no one wants to listen anymore and everyone avoids you as the person who talks too much. But it can be learned. I've managed it well enough that when I tell people I have AS they don't believe me at first. : ) But that's taken 4 years of practice and I still have work to do. Be patient with yourself. You can do it. Good luck!