-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behaviour of ObservableMixin when its off
method is called while its fire
method is currently iterating over listeners
#1498
Comments
@meejah any hints on ^? |
|
Using But I ended up with this quick fix, by extending
And it seems works as i expected |
I'll keep the issue open as a "docs issue": we could at least add @meejah notes to the doc string of
just a note: this might result in a performance bottleneck on high load scenarios. the |
Yeah, my suggestion to use Ideally, we'd have some idea of the actual performance impact of this .. at the very least, the docs should be updated (i.e. "don't call |
Suppose we have two listeners on "close" event.
This will output:
This means, when ObservableMixin
off
method is called insidelistener1
,except for last listeners, then the next listeners (
listener2
) will never get called.I think this is because ObservableMixin
off
method is called whileObservableMixin
fire
method is iterating over current listeners of event..The text was updated successfully, but these errors were encountered: