diff options
author | Martin Sustrik <sustrik@fastmq.commkdir> | 2010-01-05 14:45:10 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@fastmq.commkdir> | 2010-01-05 14:45:10 +0100 |
commit | ef049efe2ec56bb0ff5395ba8cba6e1722922e43 (patch) | |
tree | 577d47fae2c11f5032b27c57b4d7eebfc000a027 | |
parent | 8d339e959694107df8f1666634a34f54ad76ae41 (diff) |
perf tests modified to reflect change in subscription format
-rw-r--r-- | perf/c/local_thr.c | 2 | ||||
-rw-r--r-- | perf/cl/local-thr.lisp | 2 | ||||
-rw-r--r-- | perf/cpp/local_thr.cpp | 2 | ||||
-rw-r--r-- | perf/java/local_thr.java | 2 | ||||
-rw-r--r-- | perf/python/local_thr.py | 2 | ||||
-rw-r--r-- | perf/ruby/local_thr.rb | 2 | ||||
-rw-r--r-- | src/zmq_engine.cpp | 8 |
7 files changed, 11 insertions, 9 deletions
diff --git a/perf/c/local_thr.c b/perf/c/local_thr.c index 94a011d..f39d63f 100644 --- a/perf/c/local_thr.c +++ b/perf/c/local_thr.c @@ -51,7 +51,7 @@ int main (int argc, char *argv []) s = zmq_socket (ctx, ZMQ_SUB); assert (s); - rc = zmq_setsockopt (s, ZMQ_SUBSCRIBE , "*", 1); + rc = zmq_setsockopt (s, ZMQ_SUBSCRIBE , "", 0); assert (rc == 0); // Add your socket options here. diff --git a/perf/cl/local-thr.lisp b/perf/cl/local-thr.lisp index 1098c47..0944364 100644 --- a/perf/cl/local-thr.lisp +++ b/perf/cl/local-thr.lisp @@ -30,7 +30,7 @@ (zmq::with-context (ctx 1 1) (zmq:with-socket (s ctx zmq:sub) - (zmq:setsockopt s zmq:subscribe "*") + (zmq:setsockopt s zmq:subscribe "") (zmq:setsockopt s zmq:rate *rate*) (zmq:bind s *bind-address*) (let ((msg (make-instance 'zmq:msg))) diff --git a/perf/cpp/local_thr.cpp b/perf/cpp/local_thr.cpp index b5839be..acfc02d 100644 --- a/perf/cpp/local_thr.cpp +++ b/perf/cpp/local_thr.cpp @@ -38,7 +38,7 @@ int main (int argc, char *argv []) zmq::socket_t s (ctx, ZMQ_SUB); - s.setsockopt (ZMQ_SUBSCRIBE , "*", 1); + s.setsockopt (ZMQ_SUBSCRIBE , "", 0); // Add your socket options here. // For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM. diff --git a/perf/java/local_thr.java b/perf/java/local_thr.java index 171b169..e1c205d 100644 --- a/perf/java/local_thr.java +++ b/perf/java/local_thr.java @@ -37,7 +37,7 @@ class local_thr org.zmq.Socket s = new org.zmq.Socket (ctx, org.zmq.Socket.SUB); - s.setsockopt (org.zmq.Socket.SUBSCRIBE , "*"); + s.setsockopt (org.zmq.Socket.SUBSCRIBE , ""); // Add your socket options here. // For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM. diff --git a/perf/python/local_thr.py b/perf/python/local_thr.py index 395376c..9a45294 100644 --- a/perf/python/local_thr.py +++ b/perf/python/local_thr.py @@ -37,7 +37,7 @@ def main (): ctx = libpyzmq.Context (1, 1); s = libpyzmq.Socket (ctx, libpyzmq.SUB) - s.setsockopt (libpyzmq.SUBSCRIBE , "*"); + s.setsockopt (libpyzmq.SUBSCRIBE , ""); # Add your socket options here. # For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM. diff --git a/perf/ruby/local_thr.rb b/perf/ruby/local_thr.rb index 58447b4..f1c0fdf 100644 --- a/perf/ruby/local_thr.rb +++ b/perf/ruby/local_thr.rb @@ -29,7 +29,7 @@ message_count = ARGV[2].to_i ctx = Context.new(1, 1, 0) s = Socket.new(ctx, SUB); -s.setsockopt(SUBSCRIBE, "*"); +s.setsockopt(SUBSCRIBE, ""); # Add your socket options here. # For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM. diff --git a/src/zmq_engine.cpp b/src/zmq_engine.cpp index 40cedfb..a79c0bd 100644 --- a/src/zmq_engine.cpp +++ b/src/zmq_engine.cpp @@ -102,9 +102,11 @@ void zmq::zmq_engine_t::in_event () // Stop polling for input if we got stuck. if (processed < insize) { - zmq_assert (false); - // TODO: This may happen is queue limits are implemented. - // reset_pollin (handle); + + // This may happen if queue limits are implemented or when + // init object reads all required information from the socket + // and rejects to read more data. + reset_pollin (handle); } // Flush all messages the decoder may have produced. |