When you're in a social situation where it seems like it's going to be nothing but boredom, you can't come up with a decent means of conversation to save your life, and sticking around will leave a bad impression - how do you bail out gracefully?
If you mean, spending an evening with the family of my brother's wife... ?
Well... Either:
1/ I forget myself with a good book, or a good theoretical puzzle to solve. This way I'll ignore the rest of world around me. Works especially well for introverts or if you have a very exciting competition to plan ahead.
2/ I find a lame excuse to quit the scene. Most sophisticated excuses are the ones where the audience seem only partly responsible for your sudden departure. Don't hesitate to be dramatic, to invent a situation that looks really out of the ordinary, because -> ordinary excuses never work, and always attract suspicion ->it will be easier to remember, if you have to play this comedy once again.
3/ Pretend you were busy and that you have completely forgotten you had a dinner with them. Even if you're not the kind of person that forgets schedules, sometimes it's useful to forget them
on purpose, and get the reputation generally associated with that light behaviour. This way, people do not feel offended because you despise them (true reason), but rather because they can blame your "legendary forgetfulness" (imaginary reason). It's less worst, if you understand what I mean. They won't feel threatened, and hence, may behave less aggressively.
4/ Mix the three previous solutions. But always remember to never hesitate to cheat, lie, and be amoral if necessary. After all, if what they can offer you is only boredom THEY deserve it, not you.