问十九:yield函数的作用?

* A hint to the scheduler that the current  thread is willing to yield

* its current use of a processor. The scheduler  is free to ignore this

* hint.

hint:暗示

scheduler:调度器

yield:退让,让出

is free to:自由的

 

当前线程会给调度器一个提示,说明它可以让出当前正在使用的处理器资源调度器自由选择是否忽略这个暗示(就是提醒一下调度器,我可以让出资源了,你要不要。调度器视情况而定,要不要取消掉当前线程的资源占用)

全部评论

相关推荐

点赞 评论 收藏
分享
牛客928043833号:在他心里你已经是他的员工了
点赞 评论 收藏
分享
嵌入式求职之路:可以看我经验😂,https://www.nowcoder.com/share/jump/73221730841876945
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务