On 25/01/2012, at 5:56 AM, Pieter Hintjens wrote:

> On Tue, Jan 24, 2012 at 10:24 AM, [email protected]
> <[email protected]> wrote:
> 
>> The guide says it only targets libzmq 2.x. Makes sense as that is the stable
>> version at the moment, 3.x api could change
>> Http://zguide.zeromq.org/page:all#toc11
>> It could possibly make this more apparent.
> 
> As soon as 3.1 hits stable, I'll update the Guide to match. I'll add
> an explanation to make it more clear now.


IMHO the issue isn't just upgrading the Guide .. it's also the examples.
AFAICS there's a 2.1 API and a separate 3.1 API but only one Guide.

If there were a separate 3.1 Guide people responsible for bindings could
start upgrading the binding examples.

As it is there are Felix examples in the 2.1 Guide which are actually
working 3.1 code. It looks a bit weird because where the C
example says, eg: 

//  Connect work threads to client threads via a queue
zmq_device  (ZMQ_QUEUE, clients, workers)

my code says:

//  Connect work threads to client threads via a queue
var pollitems = varray (
  zmq_poll_item (clients, ZMQ_POLLIN), 
  zmq_poll_item (workers,ZMQ_POLLIN));
while true do
  C_hack::ignore$ poll(pollitems, -1.0);
  if (pollitems.[0].revents \& ZMQ_POLLIN).short != 0s do
    send_strings workers clients.recv_strings;
  done
  if (pollitems.[0].revents \& ZMQ_POLLIN).short != 0s do
    send_strings clients workers.recv_strings;
  done
done

--
john skaller
[email protected]




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

Reply via email to