Sha256: 9e05f2a70559fb123810488e1c2b6f2e5df9cf82852e303683eb7dbaf76d41a7
Contents?: true
Size: 386 Bytes
Versions: 128
Compression:
Stored size: 386 Bytes
Contents
# 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
Version data entries
128 entries across 128 versions & 1 rubygems