Module: GoChanel

Defined in:
lib/go_chanel/chanel.rb,
lib/go_chanel.rb,
lib/go_chanel/pipe.rb,
lib/go_chanel/pool.rb,
lib/go_chanel/task.rb,
lib/go_chanel/version.rb,
lib/go_chanel/err_notifier.rb

Overview

chanel is a FIFO queue. It will sleep when push into a channel with full buffer. It will sleep when pop from an empty channel It will raise Exception when push into a closed channel It will still work when pop form an empty channel just like go channel

Defined Under Namespace

Classes: Chanel, ChanelException, ErrNotifier, Pipe, PipeException, Pool, Task

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.go(*args, &proc) ⇒ Object



9
10
11
12
13
# File 'lib/go_chanel.rb', line 9

def self.go(*args, &proc)
  Thread.new(args) do |params|
    proc.call(*params)
  end
end