On Sat, Jan 18, 2014 at 10:34 AM, Martin Hansen <lists / ruby-forum.com> wrote:
> If you feed it more than a couple of hundred lines of data the deadlock
> happens.

No knowledge of gem "parallels" here either but this phenomenon
happens also if one does not properly parallelize IO. It may be an
explanation.  If it is what I am suggesting then everything works as
long as data size is less as some buffer size because then an IO
operation can finish even if there is no live reader.  If you exceed
the limit then one IO operation blocks waiting for another to read
data from the buffer so it can write more data.  If the other write
operation is somehow blocked by the first one (i.e. via some
synchronization mechanism or plainly because it is invoked from the
same thread afterwards) then the deadlock happens: the writer cannot
finish and the reader never gets a chance to read.

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/