Closed tutufool closed 6 years ago
@tutufool in the future can you please title your PRs with what they are accomplishing, then reference the related issue in the body of the pull request
Some of us follow this repo at a distance so a url for an issue title doesn't mean much in your email inbox
@devinsba Sorry about that, the actuall title should be something like: defensive check against abnormal BraveScope.close()
This PR is trageting for scenarios that user does not follow try-with-resource pattern when using scope.
For example:
scope opened in threadA and closed into threadB
Parent scope closed before child scope, like:
BraveScope scopeA = ...
BraveScope scopeB = ...
scopeA.close()
scopeB.close()
PS there are some things shifting around in the OT java repo which might make some of this less necessary. Also, there's a chance we can externalize the scoping guards a little with ScopeDecorator which is recently in brave.
Sounds great! Then I'll close this PR.
Enhancement on abnormal scope close.
[edit by devinsba] Fixes https://github.com/openzipkin-contrib/brave-opentracing/issues/76