As I wrote about in the practical side to discipline, any form of discipline has to be handled as swiftly as possible. As the child ages and gains a better perspective on time and memory, the definition of "immediate" will lengthen, but failure to handle issues in a timely fashion is simply going to confuse the kid. After all, if something is really important, then it should be handled immediately, right?
That even pertains to public locations and special events at which any misbehavior is highlighted in neon green. Kids do better when they have some notice or warning about what’s coming, so we’ve made it a habit to talk with the kids in advance and give them some idea of what they can expect and what’s expected of them. That said, it took me time to accept that even well-behaved kids have their moments and I’ve had to learn that paying full attention at any public event is liable to not happen. I’ve simply had to adjust my own expectations of what’s doable with children.
And if you’re worried about what people will think, most adults are appreciative that parents are willing to ride herd on their children. The key is to maintain control of your own temper, so again, adjust your expectations accordingly.