diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-30 06:22:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-30 06:22:30 +0000 |
commit | 4b298ad77a8388f0aae62daeca66659a8effeade (patch) | |
tree | 163674f4123bf461a86b4f6fd1de964297057bae /sample | |
parent | 0df79477bd2cd534ad2d89bfdbf9708c64b59eed (diff) |
Use qualified names
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r-- | sample/drb/dhasen.rb | 2 | ||||
-rw-r--r-- | sample/drb/dlogd.rb | 2 | ||||
-rw-r--r-- | sample/drb/dqueue.rb | 2 | ||||
-rw-r--r-- | sample/drb/http0serv.rb | 4 | ||||
-rw-r--r-- | sample/drb/name.rb | 4 | ||||
-rw-r--r-- | sample/philos.rb | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/sample/drb/dhasen.rb b/sample/drb/dhasen.rb index 651b9c6c8a..9ab8534588 100644 --- a/sample/drb/dhasen.rb +++ b/sample/drb/dhasen.rb @@ -23,7 +23,7 @@ class Dhasen include DRbUndumped def initialize - @mutex = Mutex.new + @mutex = Thread::Mutex.new end def sparse(str, *arg) diff --git a/sample/drb/dlogd.rb b/sample/drb/dlogd.rb index 42f302e64e..be364511dc 100644 --- a/sample/drb/dlogd.rb +++ b/sample/drb/dlogd.rb @@ -10,7 +10,7 @@ class Logger def initialize(fname) @fname = fname.to_s @fp = File.open(@fname, "a+") - @queue = Queue.new + @queue = Thread::Queue.new @th = Thread.new { self.flush } end diff --git a/sample/drb/dqueue.rb b/sample/drb/dqueue.rb index 1c8878c080..1a405f5be5 100644 --- a/sample/drb/dqueue.rb +++ b/sample/drb/dqueue.rb @@ -6,7 +6,7 @@ require 'thread' require 'drb/drb' -DRb.start_service(nil, Queue.new) +DRb.start_service(nil, Thread::Queue.new) puts DRb.uri DRb.thread.join diff --git a/sample/drb/http0serv.rb b/sample/drb/http0serv.rb index 9503a1790c..049f5a1de5 100644 --- a/sample/drb/http0serv.rb +++ b/sample/drb/http0serv.rb @@ -18,7 +18,7 @@ module DRb def initialize(config, drb) @config = config @drb = drb - @queue = Queue.new + @queue = Thread::Queue.new end def do_POST(req, res) @@ -46,7 +46,7 @@ module DRb def initialize(uri, config) @uri = uri @config = config - @queue = Queue.new + @queue = Thread::Queue.new setup_webrick(uri) end attr_reader :uri diff --git a/sample/drb/name.rb b/sample/drb/name.rb index 9527d47764..30c902b8f7 100644 --- a/sample/drb/name.rb +++ b/sample/drb/name.rb @@ -75,7 +75,7 @@ class Seq def initialize(v, name) @counter = v - @mutex = Mutex.new + @mutex = Thread::Mutex.new self.drb_name = name end @@ -90,7 +90,7 @@ end class Front def initialize seq = Seq.new(0, 'seq') - mutex = Mutex.new + mutex = Thread::Mutex.new mutex.extend(DRbUndumped) mutex.extend(DRbNamedObject) mutex.drb_name = 'mutex' diff --git a/sample/philos.rb b/sample/philos.rb index 5c8f43c819..622e58b4bf 100644 --- a/sample/philos.rb +++ b/sample/philos.rb @@ -8,7 +8,7 @@ srand N=9 # number of philosophers $forks = [] for i in 0..N-1 - $forks[i] = Mutex.new + $forks[i] = Thread::Mutex.new end $state = "-o"*N |