2 Star 2 Fork 1

安徽集萃智能机器人 / zmq4

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ctxoptions_unix.go 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
杨杰 提交于 2023-12-18 14:20 . 拉取zmq4库
// +build !windows
package zmq4
/*
#include <zmq.h>
#include "zmq4.h"
*/
import "C"
/*
Sets the scheduling policy for internal context’s thread pool.
This option requires ZeroMQ version 4.1, and is not available on Windows.
Supported values for this option can be found in sched.h file, or at
http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html
This option only applies before creating any sockets on the context.
Default value: -1
Returns ErrorNotImplemented41 with ZeroMQ version < 4.1
Returns ErrorNotImplementedWindows on Windows
*/
func (ctx *Context) SetThreadSchedPolicy(n int) error {
if minor < 1 {
return ErrorNotImplemented41
}
return setOption(ctx, C.ZMQ_THREAD_SCHED_POLICY, n)
}
/*
Sets scheduling priority for internal context’s thread pool.
This option requires ZeroMQ version 4.1, and is not available on Windows.
Supported values for this option depend on chosen scheduling policy.
Details can be found in sched.h file, or at
http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html
This option only applies before creating any sockets on the context.
Default value: -1
Returns ErrorNotImplemented41 with ZeroMQ version < 4.1
Returns ErrorNotImplementedWindows on Windows
*/
func (ctx *Context) SetThreadPriority(n int) error {
if minor < 1 {
return ErrorNotImplemented41
}
return setOption(ctx, C.ZMQ_THREAD_PRIORITY, n)
}
Go
1
https://gitee.com/anhui-jicui-intelligent-robot/zmq4.git
git@gitee.com:anhui-jicui-intelligent-robot/zmq4.git
anhui-jicui-intelligent-robot
zmq4
zmq4
86d67e51b9ca

搜索帮助