Home

lp edited this page Sep 13, 2010 · 3 revisions
Clone this wiki locally

The gardener class method initializes a gardener instance
with its garden supplied as a block. The invocation block must include
the grow class method and a preceeding optional initialisation section.
Parameters:
:block_size = allowed seed size in bytes
:rows = garden rows number, the number of concurent threads
:init_timeout = allow to pause execution to allow for larger gardens to initialize
Example:

gardener = Abundance.gardener( :block_size => 8192, :rows => 2, :init_timeout => 2) do processor = SpecialProcess.new Abundance.grow do |seed| command = seed.sprout results = processor.parse(command) seed.crop( true, results) end end

See online docs for more info: http://abundance.rubyforge.org/ruby-doc/