summaryrefslogtreecommitdiff
path: root/src/zmq.cpp
diff options
context:
space:
mode:
authormalosek <malosek@fastmq.com>2009-11-30 16:45:36 +0100
committermalosek <malosek@fastmq.com>2009-11-30 16:45:36 +0100
commitc637bf292d0dc97be5c94c5c96a033c2d665576c (patch)
treef6e82c3003ac1e4a646f588a7423d60c0e7dcc23 /src/zmq.cpp
parent9ccf2b42cf932b4c29ea20cc9c6e3d5d8e7a62b4 (diff)
parentfa1641afc593be5926e558381861112b584e861a (diff)
Merge branch 'master' of git@github.com:sustrik/zeromq2
Diffstat (limited to 'src/zmq.cpp')
-rw-r--r--src/zmq.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/zmq.cpp b/src/zmq.cpp
index 7952b61..9b66be8 100644
--- a/src/zmq.cpp
+++ b/src/zmq.cpp
@@ -198,8 +198,10 @@ size_t zmq_msg_size (zmq_msg_t *msg_)
void *zmq_init (int app_threads_, int io_threads_, int flags_)
{
- // There should be at least a single thread managed by the dispatcher.
- if (app_threads_ <= 0 || io_threads_ <= 0 ||
+ // There should be at least a single application thread managed
+ // by the dispatcher. There's no need for I/O threads if 0MQ is used
+ // only for inproc messaging
+ if (app_threads_ < 1 || io_threads_ < 0 ||
app_threads_ > 63 || io_threads_ > 63) {
errno = EINVAL;
return NULL;