多处理与精确值

2024-09-27 09:30:10 发布

您现在位置:Python中文网/ 问答频道 /正文

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


Tags: 方法进程niceness
2条回答
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。在

有什么原因不能在子进程中调用它?在

尝试导入ctypes模块并查找pthread_schedparam()或SetThreadPriority()(Linux/Windows)。在

相关问题 更多 >

    热门问题