并调用sleep()从放pthread的线程休眠或进程? [英] Does calling sleep() from pthread put thread to sleep or process?

查看:987
本文介绍了并调用sleep()从放pthread的线程休眠或进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到有关于 pthread的睡眠Linux的

然而,当我抬头手册页我的Linux机器上,我看到了下面。

However, when I looked up man page on my linux machine, I see the following.

概要
         的#include

SYNOPSIS #include

   unsigned int sleep(unsigned int seconds);


  
  

描述
         睡眠()使当前进程休眠状态,直到秒秒
  已经过去或
         信号到达这也是不可忽视的。

DESCRIPTION sleep() makes the current process sleep until seconds seconds have elapsed or a signal arrives which is not ignored.

所以我的问题是,我想知道这名男子页我应该遵循把线程睡眠。此外,如果两个都是真的,我怎么能控制呢?

So my question is that I would like to know which man page I should follow to put the thread sleep. In addition, if both are true, how can I control that?

我也许可以写一些code,以测试它,但我希望确保能听到别人的一些反馈。

I can probably write some code to test it but I want to make sure to hear some feedback from other people as well.

感谢您。

推荐答案

在你的男人页的措辞可能是错误的。相信在kernel.org <标准和信任的 手册页/ A> 。写为你的发行版的文档的维护者,并告诉他,以更新手册页。

The wording in your man page is likely wrong. Trust the standard and trust the man page on kernel.org. Write to the maintainer of the documentation for your distro and tell him to update the manual pages.

这篇关于并调用sleep()从放pthread的线程休眠或进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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