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

Send events to GUI only before shutdown and in the proper order #7364

Conversation

kozlovsky
Copy link
Collaborator

This PR does the following:

  1. Fixes [7.13.0-RC1] RuntimeError: no running event loop #7353 by preventing events from being sent to the GUI when the EventsEndpoint is in the shutdown state and the event loop can already be closed.
  2. Second, it adds a queue to ensure that all events are sent to GUI in the same order as they were created:
  • Previously, a separate task was created for each event, which could lead to events being sent in reverse order, causing confusion on the GUI side.
  • With this update, all events are sent through the same queue, preserving the order in which they were generated. The order of messages sent is determined by the order in which they were added to the queue.

@kozlovsky kozlovsky force-pushed the fix/events_endpoint_send_events_serialized branch from dceeea3 to 2b7e261 Compare April 14, 2023 12:32
@kozlovsky kozlovsky marked this pull request as ready for review April 14, 2023 12:39
@kozlovsky kozlovsky requested a review from a team as a code owner April 14, 2023 12:39
@kozlovsky kozlovsky requested review from drew2a and removed request for a team April 14, 2023 12:39
@kozlovsky kozlovsky merged commit 7e6cb60 into Tribler:release/7.13 Apr 14, 2023
29 checks passed
@kozlovsky kozlovsky deleted the fix/events_endpoint_send_events_serialized branch April 14, 2023 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants