pub const MAX_CUSTOM_EVENTS_PER_FRAME: usize = 1000;
The most custom events delivered in one frame; the rest are discarded, which stops callbacks that post a custom event in response to a custom event forever.