For efficiency on memory, is is important to avoid allocations as much as possible.
Currently there is allocation (copy of a Set) on each emit of callback.
It is possible to do copy of Set only if there is any attempt to modify it during callback execution. In majority of cases this will avoid allocation, for the small cost of CPU for checks on modification attempts.