Skip to content
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

Event handlers are not uniquely identified #3191

Open
dktapps opened this issue Nov 20, 2019 · 1 comment
Open

Event handlers are not uniquely identified #3191

dktapps opened this issue Nov 20, 2019 · 1 comment
Labels
Category: API Related to the plugin API Type: To Do

Comments

@dktapps
Copy link
Member

dktapps commented Nov 20, 2019

Description

Event handler functions need to have a deterministic identifier to prevent duplicate registrations.

Justification

It is currently (theoretically) possible to register the same handler function to listen to an event multiple times, usually by mistake. When this happens, it works perfectly fine, until your handler function is called multiple times when the event fires.

We need a deterministic way to identify handler functions to prevent them from being registered multiple times.

@dktapps dktapps added Type: To Do Category: API Related to the plugin API labels Nov 20, 2019
@SOF3
Copy link
Member

SOF3 commented Nov 20, 2019

I encountered this issue when implementing #2470 too. I was trying to identify the current context that is trying to continue the event, but that requires a bit of hacking, mainly because of the unreliability of the manner that the event call happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: API Related to the plugin API Type: To Do
Projects
None yet
Development

No branches or pull requests

2 participants