am i correct in thinking that no :leave
function will ever be called if there is a handler anywhere in the interceptor stack?
or just those whose sister :enter
functions have not been invoked?
or just those whose interceptor is placed after the handler?
i was reading something in the documentation about this just a few days ago, but i can't seem to find it. what i see now says: the handler must be the last interceptor. i assume other interceptors' :leave
functions will be invoked, even with a handler in the final position, even if they have no corresponding :enter
function, because not doing so would severely limit the use of handlers, ever.
every time an :enter
interceptor is called, its corresponding :leave
is added to the stack of things to call when unwinding
if your interceptor only has a :leave
fn defined, if must be passed throuh on the way in to be pushed to the stack
handlers are meant to be the last thing in the chain, and you can tell because they do not get the full context (just the :request
)
i.e: they cannot enqueue anything
they do not, however, prevent :leave
fns to be called when unwinding
thanks @lkottmann!