Skip to content

Fix: telemetry thread clone vends strong sender causing delay #123

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dingfeli
Copy link
Contributor

Issue #, if available:

Description of changes:
Previously, when TelemetryThread::finish is called, it awaits for the channel to close out, with a timeout of 1s.
This always times out because TelemetryThread is used in several background tasks. Because these background tasks own the mpsc senders, the channel never closes.

This PR changes this so that clones of the TelemetryThread creates weak references. So that when the main sender is dropped, the channel closes.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@dingfeli dingfeli requested a review from a team as a code owner May 30, 2025 00:23
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.

1 participant