aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rinda
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-18 21:19:18 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-18 21:19:18 +0000
commit7bbf2f308580f468802cd7d32c94fce1b9f1779e (patch)
tree0a680f59e70a78d60e776d7b763e618fb2fec624 /lib/rinda
parent34276148c4450faa77bb298cfbe005f7c263f802 (diff)
downloadruby-7bbf2f308580f468802cd7d32c94fce1b9f1779e.tar.gz
* lib: Convert tabs to spaces for ruby files per
http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style Patch by Steve Klabnik [Ruby 1.9 - Bug #4730] Patch by Jason Dew [Ruby 1.9 - Feature #4718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rinda')
-rw-r--r--lib/rinda/ring.rb60
1 files changed, 30 insertions, 30 deletions
diff --git a/lib/rinda/ring.rb b/lib/rinda/ring.rb
index 3b59b43aaf..3ff4606e2a 100644
--- a/lib/rinda/ring.rb
+++ b/lib/rinda/ring.rb
@@ -43,10 +43,10 @@ module Rinda
def write_service
Thread.new do
- loop do
- msg = @soc.recv(1024)
- do_write(msg)
- end
+ loop do
+ msg = @soc.recv(1024)
+ do_write(msg)
+ end
end
end
@@ -56,11 +56,11 @@ module Rinda
def do_write(msg)
Thread.new do
- begin
- tuple, sec = Marshal.load(msg)
- @ts.write(tuple, sec)
- rescue
- end
+ begin
+ tuple, sec = Marshal.load(msg)
+ @ts.write(tuple, sec)
+ rescue
+ end
end
end
@@ -69,9 +69,9 @@ module Rinda
def reply_service
Thread.new do
- loop do
- do_reply
- end
+ loop do
+ do_reply
+ end
end
end
@@ -105,8 +105,8 @@ module Rinda
def self.finger
unless @@finger
- @@finger = self.new
- @@finger.lookup_ring_any
+ @@finger = self.new
+ @@finger.lookup_ring_any
end
@@finger
end
@@ -178,15 +178,15 @@ module Rinda
msg = Marshal.dump([[:lookup_ring, DRbObject.new(block)], timeout])
@broadcast_list.each do |it|
- soc = UDPSocket.open
- begin
- soc.setsockopt(Socket::SOL_SOCKET, Socket::SO_BROADCAST, true)
- soc.send(msg, 0, it, @port)
- rescue
- nil
- ensure
- soc.close
- end
+ soc = UDPSocket.open
+ begin
+ soc.setsockopt(Socket::SOL_SOCKET, Socket::SO_BROADCAST, true)
+ soc.send(msg, 0, it, @port)
+ rescue
+ nil
+ ensure
+ soc.close
+ end
end
sleep(timeout)
end
@@ -199,13 +199,13 @@ module Rinda
queue = Queue.new
Thread.new do
- self.lookup_ring(timeout) do |ts|
- queue.push(ts)
- end
- queue.push(nil)
- while it = queue.pop
- @rings.push(it)
- end
+ self.lookup_ring(timeout) do |ts|
+ queue.push(ts)
+ end
+ queue.push(nil)
+ while it = queue.pop
+ @rings.push(it)
+ end
end
@primary = queue.pop