Currently, if you apply once to a very expensive (computationally) handler, and then trigger the event it was subbed to from an async environment twice or more - the handler will still be executed more than once.
This happens because the once function calls unsubscribeafter the handler finishes executing. Ideally, once should unsub the handler right at the start of the execution to ensure the actuality of the event-map's state.
Currently, if you apply
once
to a very expensive (computationally) handler, and then trigger the event it was subbed to from an async environment twice or more - the handler will still be executed more than once.This happens because the
once
function callsunsubscribe
after the handler finishes executing. Ideally,once
should unsub the handler right at the start of the execution to ensure the actuality of the event-map's state.