-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Consider an API to reset thread-local Span data #414
Comments
Adding such an API would be much appreciated. My workload is similar to what you described in your comment. David, did you already have an API in mind? I'd be happy to file a PR. Also for my understanding: The idea behind the thread-local source map is to avoid a ref on Span to safe bytes? |
Something like
|
Basically truncate this thing:
proc-macro2/src/fallback.rs
Lines 323 to 325 in fecb02d
Resetting would be a claim that all currently existing non-call-site spans on the current thread are no longer in use, or it's okay if methods like
line
/column
andsource_text
crash or produce wrong results.A workload that involves parsing all versions of all crates on a thread pool of 64 threads would need this, because otherwise our 32-bit positions would overflow. See #413 (comment).
The text was updated successfully, but these errors were encountered: