summaryrefslogtreecommitdiff
path: root/src/xs.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-03-13 11:10:33 +0100
committerMartin Sustrik <sustrik@250bpm.com>2012-03-13 11:10:33 +0100
commit921da22147e201455837bcd38df1af33aceff26f (patch)
treee76e001ac65d4fa96ab89468e109db05978b7f70 /src/xs.cpp
parent224b7c7a816010fc0f781372051ec7c578af42a0 (diff)
io_threads argument removed from xs_init()
The argument was changed to a context option (XS_IO_THREADS). 0MQ compatibility mode sets the option and ensures that there's at least one I/O thread present. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/xs.cpp')
-rw-r--r--src/xs.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/xs.cpp b/src/xs.cpp
index 3ee62aa..b90e383 100644
--- a/src/xs.cpp
+++ b/src/xs.cpp
@@ -63,14 +63,8 @@ const char *xs_strerror (int errnum_)
return xs::errno_to_string (errnum_);
}
-void *xs_init (int io_threads_)
+void *xs_init ()
{
- // We need at least one I/O thread to run the monitor object in.
- if (io_threads_ < 1) {
- errno = EINVAL;
- return NULL;
- }
-
#if defined XS_HAVE_OPENPGM
// Init PGM transport. Ensure threading and timer are enabled. Find PGM
@@ -111,7 +105,7 @@ void *xs_init (int io_threads_)
#endif
// Create the context.
- xs::ctx_t *ctx = new (std::nothrow) xs::ctx_t ((uint32_t) io_threads_);
+ xs::ctx_t *ctx = new (std::nothrow) xs::ctx_t;
alloc_assert (ctx);
return (void*) ctx;
}