diff options
author | rm155 <[email protected]> | 2021-07-31 16:17:55 -0400 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-10-01 17:59:42 +0900 |
commit | a6e96df573b8180568d7365a258dddc36a246fd1 (patch) | |
tree | 1b6bda1ae061f5fc8f35fbdd207f3a1ce100abe5 /lib/singleton.rb | |
parent | 136b30b414b3fcaddf0505d5a72fed8b08b2da3c (diff) |
[ruby/singleton] Change PerRactorSingleton to RactorLocalSingleton
https://github.com/ruby/singleton/commit/1216a86303
Diffstat (limited to 'lib/singleton.rb')
-rw-r--r-- | lib/singleton.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/singleton.rb b/lib/singleton.rb index 577a7b8894..4a47190e2b 100644 --- a/lib/singleton.rb +++ b/lib/singleton.rb @@ -196,10 +196,10 @@ module Singleton # Returns the singleton instance. end -module PerRactorSingleton +module RactorLocalSingleton include Singleton::SingletonInstanceMethods - module PerRactorSingletonClassMethods + module RactorLocalSingletonClassMethods include Singleton::SingletonClassMethods def instance set_mutex(Thread::Mutex.new) if Ractor.current[mutex_key].nil? @@ -214,11 +214,11 @@ module PerRactorSingleton private def instance_key - :"__PerRactorSingleton_instance_with_class_id_#{object_id}__" + :"__RactorLocalSingleton_instance_with_class_id_#{object_id}__" end def mutex_key - :"__PerRactorSingleton_mutex_with_class_id_#{object_id}__" + :"__RactorLocalSingleton_mutex_with_class_id_#{object_id}__" end def set_instance(val) @@ -231,7 +231,7 @@ module PerRactorSingleton end def self.module_with_class_methods - PerRactorSingletonClassMethods + RactorLocalSingletonClassMethods end extend Singleton::SingletonClassProperties |