Use std::set<> to track active event handlers.