Anons79 Mini Shell

Directory : /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/concurrent/
Upload File :
Current File : //opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/concurrent/thread_local_singleton.rb

# frozen_string_literal: true
module Puppet
  module Concurrent
    module ThreadLocalSingleton
      def singleton
        key = (name + ".singleton").intern
        thread = Thread.current
        value = thread.thread_variable_get(key)
        if value.nil?
          value = new
          thread.thread_variable_set(key, value)
        end
        value
      end
    end
  end
end

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]