I'm attempting the following producer/consumer pattern, but I'm trying to 
give the work to separate processes to maximize CPU resources:

function file_producer(library_root)
  files(library_root) do f
    produce(f)
  end
  produce(END_FILE_LIST)
end


@parallel for f in Task(file_producer)
  println(myid(), f)
end


When I get to the @parallel part, it fails:

ERROR: `length` has no method matching length(::Task)
 in include at /Applications/Julia-0.3.1.app/Contents/Resources/julia/lib/
julia/sys.dylib
 in include_from_node1 at loading.jl:128
 in process_options at /Applications/Julia-0.3.1.app/Contents/Resources/
julia/lib/julia/sys.dylib
 in _start at /Applications/Julia-0.3.1.app/Contents/Resources/julia/lib/
julia/sys.dylib (repeats 2 times)
while loading /Users/duane/Dropbox/Projects/wordtree/TextGrams/baseline.jl, 
in expression starting on line 1488


Is there an easy way to let multiple processes consume work like this?

Reply via email to