mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-03 04:38:42 +01:00
Merge pull request #3364 from bluca/thread_priority_get
Problem: ZMQ_SOCKET_LIMIT and ZMQ_THREAD_PRIORITY have the same value
This commit is contained in:
commit
0761e6bb48
@ -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_)
|
|||||||
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_)
|
|||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user