Sha256: d888fa9880a49c28b7e6428e81ad0f543fb7830591389cd93fba43035cf3c83e

Contents?: true

Size: 459 Bytes

Versions: 21

Compression:

Stored size: 459 Bytes

Contents

# make default what should be default
Thread.abort_on_exception = true

class Thread

  def self.name
    Thread.current[:name] || Java::JavaLang::Thread.currentThread.getName
  end

  def self.name=(value)
    Thread.current[:name] = value
    if RUBY_PLATFORM == "java"
      Java::JavaLang::Thread.currentThread.setName(value)
    end
  end

  def self.join
    Thread.list.reject do |thread|
      thread == Thread.current
    end.each(&:join)
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
liquid-ext-3.0.0 lib/liquid/ext/thread.rb