diff options
Diffstat (limited to 'lib/sync.rb')
-rw-r--r-- | lib/sync.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/sync.rb b/lib/sync.rb index 9f9706d9ee..dc54626b4f 100644 --- a/lib/sync.rb +++ b/lib/sync.rb @@ -1,5 +1,5 @@ # -# sync.rb - ���������2-�ե��������å����饹 +# sync.rb - 2 phase lock with counter # $Release Version: 0.2$ # $Revision$ # $Date$ @@ -54,7 +54,7 @@ module Sync_m SH = :SH EX = :EX - # �㳰��� + # exceptions class Err < StandardError def Err.Fail(*opt) fail self, sprintf(self::Message, *opt) @@ -97,7 +97,7 @@ module Sync_m dummy = cl.new Sync_m.extendable_module(dummy) rescue NameError - # new���������Ƥ��ʤ�����, DATA�Ȥߤʤ�. + # if new is not defined, cl must be Data. For_primitive_object end end @@ -105,8 +105,8 @@ module Sync_m def Sync_m.extend_class(cl) return super if cl.instance_of?(Module) - # �⥸�塼��λ��ϲ��⤷�ʤ�. ���饹�ξ��, Ŭ�ڤʥ⥸�塼��η��� - # ��alias��Ԥ�. + # do nothing for Modules + # make aliases and include the proper module. real = includable_module(cl) cl.module_eval %q{ include real @@ -267,7 +267,7 @@ module Sync_m sync_sh_locker[Thread.current] = count + 1 ret = TRUE when EX - # ����, �⡼�ɤ�EX�Ǥ������, ɬ��EX���å��Ȥʤ�. + # in EX mode, lock will upgrade to EX lock if sync_ex_locker == Thread.current self.sync_ex_count = sync_ex_count + 1 ret = TRUE @@ -342,7 +342,7 @@ module Sync_m def For_primitive_object.sync_finalize(id) wait = Sync_Locked.delete(id) - # waiting == [] �Ȥ����� GC�����Τ�, �Ԥ�����β����ϰ�̣���ʤ�. + # need not to free waiting end def sync_mode |