是真的,更高优先级的线程将首先执行并更改其名称吗? [英] Is it true the higher priority thread would be executed first and it changes its name ?

查看:62
本文介绍了是真的,更高优先级的线程将首先执行并更改其名称吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Is it true the higher priority thread would be executed first and it changes its name during execution ?

推荐答案

优先级会影响平均吞吐量.永远不能保证操作顺序.任何基于不同线程中操作顺序假设的代码都是无效的.当某些操作顺序是计算的逻辑约束时,只能通过显式使用线程同步原语来实现.

实际上,根据经验,建议不要修改线程和进程的优先级.

—SA
Priorities affect average throughput. The order of operation is never guaranteed. Any code based on assumptions of the order of operation in different threads is invalid. When certain order of operation is a logical constraint of computing, it can only be achieved by explicit use of thread synchronization primitives.

In practice, is is recommended not to modify priorities of thread and processes, as a rule of thumb.

—SA


这篇关于是真的,更高优先级的线程将首先执行并更改其名称吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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