summaryrefslogtreecommitdiff
path: root/lib/sync.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sync.rb')
-rw-r--r--lib/sync.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/sync.rb b/lib/sync.rb
index 168ba9f5c8a..bb2ad2b00f0 100644
--- a/lib/sync.rb
+++ b/lib/sync.rb
@@ -1,8 +1,8 @@
#
# sync.rb - 2 phase lock with counter
-# $Release Version: 1.0$
-# $Revision$
-# by Keiju ISHITSUKA(keiju@ishitsuka.com)
+# $Release Version: 1.0$
+# $Revision$
+# by Keiju ISHITSUKA(keiju@ishitsuka.com)
#
# --
# Sync_m, Synchronizer_m
@@ -10,8 +10,8 @@
# obj.extend(Sync_m)
# or
# class Foo
-# include Sync_m
-# :
+# include Sync_m
+# :
# end
#
# Sync_m#sync_mode
@@ -100,12 +100,12 @@ module Sync_m
def sync_extend
unless (defined? locked? and
- defined? shared? and
- defined? exclusive? and
- defined? lock and
- defined? unlock and
- defined? try_lock and
- defined? synchronize)
+ defined? shared? and
+ defined? exclusive? and
+ defined? lock and
+ defined? unlock and
+ defined? try_lock and
+ defined? synchronize)
Sync_m.define_aliases(singleton_class)
end
sync_initialize
@@ -281,7 +281,7 @@ module Sync_m
end
when EX
if sync_mode == UN or
- sync_mode == SH && sync_sh_locker.size == 1 && sync_sh_locker.include?(Thread.current)
+ sync_mode == SH && sync_sh_locker.size == 1 && sync_sh_locker.include?(Thread.current)
self.sync_mode = m
self.sync_ex_locker = Thread.current
self.sync_ex_count = 1