Skip to content

Commit

Permalink
Refactor: we're always on JRuby these days
Browse files Browse the repository at this point in the history
(other part of same method assume JRuby already)

Fixes #11458
  • Loading branch information
kares committed Dec 30, 2019
1 parent 53871e2 commit 57facfd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions logstash-core/lib/logstash/util.rb
Expand Up @@ -11,10 +11,8 @@ module LogStash::Util
def self.set_thread_name(name)
previous_name = Java::java.lang.Thread.currentThread.getName() if block_given?

if RUBY_ENGINE == "jruby"
# Keep java and ruby thread names in sync.
Java::java.lang.Thread.currentThread.setName(name)
end
# Keep java and ruby thread names in sync.
Java::java.lang.Thread.currentThread.setName(name)
Thread.current[:name] = name

if UNAME == "linux"
Expand Down

0 comments on commit 57facfd

Please sign in to comment.