runtime/event: Better event dispatcher