Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/datadog/core/remote/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ def lift

@condition.broadcast
ensure
@mutex.unlock
# NOTE: The `locked?` check is not preventing a context switching, hence
# it is not preventing a race condition. But in some rare cases
# in RSpec of JRuby 9.4 the test case will not let locking happen.
# That will cause specs to fail.
@mutex.unlock if @mutex.locked?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does really not look right to me at all...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My proposal: #4957

end
end

Expand Down