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

Doc additions to warn about tokio current #2594

Merged

Conversation

cijothomas
Copy link
Member

Fixes #2583
and few doc improvements.

@cijothomas cijothomas requested a review from a team as a code owner February 3, 2025 19:55
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.3%. Comparing base (7ca4a85) to head (89c0849).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2594   +/-   ##
=====================================
  Coverage   79.3%   79.3%           
=====================================
  Files        118     118           
  Lines      22478   22478           
=====================================
  Hits       17835   17835           
  Misses      4643    4643           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely documented.

/// **Warning**: When using tokio's current-thread runtime, `shutdown()`, which
/// is a blocking call ,should not be called from your main thread. This can
/// cause deadlock. Instead, call `shutdown()` from a separate thread or use
/// tokio's `spawn_blocking`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is valid for force_flush() too.

@cijothomas cijothomas merged commit 013d51a into open-telemetry:main Feb 3, 2025
21 checks passed
@cijothomas cijothomas deleted the cijothomas/doc-tokio-current branch February 3, 2025 21:35
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.

Cannot shutdown or force_flush in a Tokio::CurrentThread application when using Tonic
2 participants