-
-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue where observers could be triggered multiple times for the s…
…ame event Summary: This diff fixes a Flecs issue where mulit-component observers could get triggered multiple times for the same event. Two separate problems contributed to this issue: 1. Observers copied the wrong event id used to dedup events. Instead of using the event id passed by `flecs_emit`, observers used the global event id counter. In most cases these are the same, except when nested `flecs_emit` calls happen (which is rare). 2. The event id was copied at the wrong time. When a multi-component observer gets triggered, it still needs to verify if the event matches its query. Observers copied the event id before checking if the query matched, which could cause events to get skipped or delivered multiple times. Differential Revision: D67219403
- Loading branch information
1 parent
188e29e
commit ea58b5b
Showing
5 changed files
with
112 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters