You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To be pedantic, if and only if the reader is thread safe.
The Tracer member functions create_span, extract_span, and extract_or_create_span all instantiate a new TraceSegment and do not modify the invoked Tracer.
Those member functions could have been labeled const, but I left them non-const for possible future need. If such a need were to arrive, the maintainers would have to think about threading.
Here's an experimental commit that actually does make them const. All of the tests still pass.
Multiple new traces can be created from a single Tracer instance concurrently from multiple threads. It is thread safe.
See #44 for a (contrived) scenario that is not thread safe, but that is unrelated to your example.
Is this thread safe ?
The text was updated successfully, but these errors were encountered: