Class: Thread
- Inherits:
-
Object
- Object
- Thread
- Defined in:
- lib/thread/promise.rb,
lib/thread/process.rb,
lib/thread/channel.rb,
lib/thread/future.rb,
lib/thread/every.rb,
lib/thread/delay.rb,
lib/thread/pool.rb,
lib/thread/pipe.rb
Defined Under Namespace
Classes: Channel, Delay, Every, Future, Pipe, Pool, Process
Class Method Summary collapse
-
.channel(*args, &block) ⇒ Object
Helper to create a channel.
-
.delay(&block) ⇒ Object
Helper to create Thread::Delay.
-
.every(every, &block) ⇒ Object
Helper to create an every.
-
.future(pool = nil, &block) ⇒ Object
Helper to create a future.
-
.pool(*args, &block) ⇒ Object
Helper to create a pool.
-
.process(&block) ⇒ Object
Helper to create a process.
-
.promise ⇒ Object
Helper method to create a promise.
-
.|(func) ⇒ Object
Helper to create a pipe.
Class Method Details
.channel(*args, &block) ⇒ Object
Helper to create a channel.
106 107 108 |
# File 'lib/thread/channel.rb', line 106 def self.channel (*args, &block) Thread::Channel.new(*args, &block) end |
.delay(&block) ⇒ Object
Helper to create Thread::Delay
84 85 86 |
# File 'lib/thread/delay.rb', line 84 def self.delay (&block) Thread::Delay.new(&block) end |
.every(every, &block) ⇒ Object
Helper to create an every
187 188 189 |
# File 'lib/thread/every.rb', line 187 def self.every (every, &block) Thread::Every.new(every, &block) end |
.future(pool = nil, &block) ⇒ Object
Helper to create a future
148 149 150 |
# File 'lib/thread/future.rb', line 148 def self.future (pool = nil, &block) Thread::Future.new(pool, &block) end |
.pool(*args, &block) ⇒ Object
Helper to create a pool.
425 426 427 |
# File 'lib/thread/pool.rb', line 425 def self.pool (*args, &block) Thread::Pool.new(*args, &block) end |
.process(&block) ⇒ Object
Helper to create a process.
69 70 71 |
# File 'lib/thread/process.rb', line 69 def self.process (&block) Thread::Process.new(&block) end |