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

[trace] Fix race between CreateAsyncChild and span.Send #39

Merged
merged 1 commit into from
Nov 28, 2018

Commits on Nov 23, 2018

  1. [trace] Fix race between CreateAsyncChild and span.Send

    `CreateChild` adds a new span to the current span's list of children. `CreateAsyncChild` calls `CreateChild`, then sets the isAsync bool on the span. This can lead to a race caused by simultaneous read of the child span's `isAsync` bool by `Send` as it's being written by `CreateAsyncChild`. To fix this, I refactored  the code a bit to allow us to set `isAsync` before the span is added to the list of child spans.
    
    This doesn't seem to be the same race reported in #38 but it should be fixed either way.
    tredman committed Nov 23, 2018
    Configuration menu
    Copy the full SHA
    f5f2674 View commit details
    Browse the repository at this point in the history