I remember this happening all the way back to junior high and high school... usually with a grain/starch, most often rice, pasta or bread. Sometimes taking a drink of something carbonated (especially Coke) works to flush it down into my stomach if I have it on hand, other times I have to get to a sink, toilet, or outside because I have to bring it back up.
An hour or two ago was my worst episode of it yet, it happened twice within twenty minutes of each other... usually it only happens once, and I can continue on and finish eating whatever it is. This was violent and the most painful yet.
I've found it sometimes happens when I'm really hungry and I eat too quickly (though the dehydration angle may have something to do with it), but more recently it seems to happen when I eat reheated rice. Usually anything but minute rice will do it, especially if it's reheated. Tonight it was more moist, I used butter to reheat it in the rice cooker, and it came out good, tasted fine, and I even chewed it slowly after the first incident, but when it happened again, I had to throw out the rest of the rice. I feel kind of sad about that; I hate wasting food.
Anyway, occasionally when it happens to a lesser degree, sometimes I just have to straighten up or, as I said, take a drink of pop, and I too can feel it pass. If I remember next time, I'll try raising my hands over my head.