Sha256: 021b9751f76d618c50f3d85f70c17a7a66c87239cba7c0f7b2fd76db9dee5718
Contents?: true
Size: 387 Bytes
Versions: 32
Compression:
Stored size: 387 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
32 entries across 32 versions & 1 rubygems