多处理和niceness值 [英] Multiprocessing and niceness value

查看:57
本文介绍了多处理和niceness值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道在多处理中创建进程或池时设置它的 niceness 值的简单方法吗?

Does anyone know of an easy way to set the niceness value of a Process or Pool when it is created in multiprocessing?

推荐答案

os.nice(increment)
Add increment to the process’s "niceness". Return the new niceness. Availability: Unix.

来自 http://docs.python.org/library/os.html#os.nice.

有什么理由不能在子进程中调用它吗?

Is there a reason you can't call this in the child process?

这篇关于多处理和niceness值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆