On Sat, Sep 11, 2010 at 4:48 PM, Jon Dyte <[email protected]> wrote:

> however won't this example only work with one worker thread?
> (which is all it has, if you pthread_create another it'll fail to bind
> as the)

Yes, in this example the workers send data back to the main code using
a pub/sub combo.  I didn't fix that because I was looking for David's
error, not redesigning his architecture.

You would not in practice use pubsub to send data back from 10 workers
to 1 main.  You would use push/pull and connect all the workers to a
single collector socket in the main.  I've changed the example now to
do that.  It's now trivial to start more worker threads.

So part of the problem here was also using the wrong pattern (pubsub
instead of pipeline).

In fact it really is a pipeline pattern, since clients don't get
answers back but rather submit tasks that are pushed downstream.  I'll
add this example to the user guide.

-Pieter
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to