What until a few seconds before you're going to finish, then stop. Then start up a little while later. Do that a few times and the pay off is great, I've been told.
But, being a girl, I don't know how to prevent blue balls, but if you do this right you don't have to worry about it.
I feel like that was a little tmi...