Unverified Commit 0761e6bb authored by Doron Somech's avatar Doron Somech Committed by GitHub

Merge pull request #3364 from bluca/thread_priority_get

Problem: ZMQ_SOCKET_LIMIT and ZMQ_THREAD_PRIORITY have the same value
parents f0d97e02 93b36893
...@@ -70,12 +70,6 @@ The 'ZMQ_THREAD_SCHED_POLICY' argument returns the scheduling policy for ...@@ -70,12 +70,6 @@ The 'ZMQ_THREAD_SCHED_POLICY' argument returns the scheduling policy for
internal context's thread pool. internal context's thread pool.
ZMQ_THREAD_PRIORITY: Get scheduling priority for I/O threads
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_THREAD_PRIORITY' argument returns the scheduling priority for
internal context's thread pool.
ZMQ_THREAD_NAME_PREFIX: Get name prefix for I/O threads ZMQ_THREAD_NAME_PREFIX: Get name prefix for I/O threads
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_THREAD_NAME_PREFIX' argument gets the numeric prefix of each thread The 'ZMQ_THREAD_NAME_PREFIX' argument gets the numeric prefix of each thread
......
...@@ -469,10 +469,7 @@ int zmq::thread_ctx_t::set (int option_, int optval_) ...@@ -469,10 +469,7 @@ int zmq::thread_ctx_t::set (int option_, int optval_)
int zmq::thread_ctx_t::get (int option_) int zmq::thread_ctx_t::get (int option_)
{ {
int rc = 0; int rc = 0;
if (option_ == ZMQ_THREAD_PRIORITY) { if (option_ == ZMQ_THREAD_SCHED_POLICY) {
scoped_lock_t locker (_opt_sync);
rc = _thread_priority;
} else if (option_ == ZMQ_THREAD_SCHED_POLICY) {
scoped_lock_t locker (_opt_sync); scoped_lock_t locker (_opt_sync);
rc = _thread_sched_policy; rc = _thread_sched_policy;
} else if (option_ == ZMQ_THREAD_NAME_PREFIX) { } else if (option_ == ZMQ_THREAD_NAME_PREFIX) {
......
...@@ -112,8 +112,6 @@ void test_ctx_thread_opts (void *ctx_) ...@@ -112,8 +112,6 @@ void test_ctx_thread_opts (void *ctx_)
ctx_, ZMQ_THREAD_PRIORITY, ctx_, ZMQ_THREAD_PRIORITY,
1 /* any positive value different than the default will be ok */); 1 /* any positive value different than the default will be ok */);
assert (rc == 0); assert (rc == 0);
rc = zmq_ctx_get (ctx_, ZMQ_THREAD_PRIORITY);
assert (rc == 1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment