Technically, you can revoke consent at any time. As a matter of law, if a woman consents to sex but changes her mind mid-stream and demands that her partner stop and withdraw, he is obliged to stop and withdraw. However, "the heat of passion" being what it is, I suspect that most of us would consider it unrealistic to expect that a demand to stop will be instantly complied with when uttered when intercourse is already well under way.