Sha256: c1b1e9cfc75f7506731b3e7b9d5cd1a37d25903d1aad0cc9e68ed7dd87bb8b47
Contents?: true
Size: 362 Bytes
Versions: 20
Compression:
Stored size: 362 Bytes
Contents
# frozen_string_literal: true module Puppet module Concurrent module ThreadLocalSingleton def singleton key = (name + ".singleton").intern thread = Thread.current unless thread.thread_variable?(key) thread.thread_variable_set(key, new) end thread.thread_variable_get(key) end end end end
Version data entries
20 entries across 20 versions & 1 rubygems