Skip to content

Commit

Permalink
remove synchronization around methods that set multiple tags as mutex…
Browse files Browse the repository at this point in the history
…t is not reentrant, keep only smallest operations synchronized
  • Loading branch information
anmarchenko committed Nov 24, 2023
1 parent 89ef625 commit d656b42
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions lib/datadog/ci/concurrent_span.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,6 @@ def initialize(tracer_span)
@mutex = Mutex.new
end

# Sets the status of the span to "pass". This method is thread-safe.
# @return [void]
def passed!
synchronize { super }
end

# Sets the status of the span to "fail". This method is thread-safe.
# @param [Exception] exception the exception that caused the test to fail.
# @return [void]
def failed!(exception: nil)
synchronize { super }
end

# Sets the status of the span to "skip". This method is thread-safe.
# @param [Exception] exception the exception that caused the test to fail.
# @param [String] reason the reason why the test was skipped.
# @return [void]
def skipped!(exception: nil, reason: nil)
synchronize { super }
end

# Gets tag value by key. This method is thread-safe.
# @param [String] key the key of the tag.
# @return [String] the value of the tag.
Expand Down

0 comments on commit d656b42

Please sign in to comment.