Replies: 3 comments 1 reply
-
My use case is not exactly the situation described in the original question because is about closing a listener from another listener, but the "AKA async" concern applies too: I have some data capsules that are being auto-reset on websocket disconnection. Gonna test, but I want if possible your thoughts on this situation. This case is not exactly the situation described in the original question because is about closing a listener from another listener, but the "AKA async" concern applies too. Thanks |
Beta Was this translation helpful? Give feedback.
-
Also, I suppose that calling twice on a listener dispose function is okay. Am I correct? |
Beta Was this translation helpful? Give feedback.
-
I think you can dispose a listener from within another listener based on a look at the code, but that is a good question to raise. It feels like a reason for needing it could be a little fishy, so if there's a way to restructure your code so you don't need listener-dispose-in-listener, I might recommend it. It's also not a currently tested functionality so it could break in the future. |
Beta Was this translation helpful? Give feedback.
-
Is it safe (or could make sense) to call a listener "dispose" function from within the listener?
Must I do that on a new microtask or event loop (AKA async)?
Beta Was this translation helpful? Give feedback.
All reactions