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

Possible bug in the EventQueue #420

Open
Azengar opened this issue Nov 1, 2022 · 0 comments
Open

Possible bug in the EventQueue #420

Azengar opened this issue Nov 1, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Azengar
Copy link

Azengar commented Nov 1, 2022

In the Update method of the EventQueue, when reaching a not ready blocking event the queue will return. But I think it should break instead. Otherwise Standard not ready events are lost.

 var newEvents = new List<PendingEvent>();
            while (events.TryPeek(out PendingEvent pending))
            {
                if (!pending.Event.CanExecute())
                {
                    switch (pending.Type)
                    {
                        case ConditionalEventType.Standard:
                            newEvents.Add(events.Dequeue());
                            continue;
                        case ConditionalEventType.Blocking:
                            return; // When returning here if newEvents is not empty then events are lost without being executed**
                        default:
                            throw new NotImplementedException();
                    }
                }
@Rawaho Rawaho added the bug Something isn't working label Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants