An event dispatcher with priorities