My approach to exercise classes and parties is strikingly similar: Just keep telling myself I can leave in 5 more minutes if I want to. And then I usually end up staying until the end for both and not regretting it.
I'm such a recovering quitter that if I don't let myself have a mental escape hatch, I'd never do anything at all. I'm thinking it was Johnny Cash I heard say "You put the screws on me, I'll screw right out from underneath you." I feel you, Johnny.