pthread睡眠linux [英] pthread sleep linux

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

问题描述

我使用pthreads创建一个有多个线程的程序。

I am creating a program with multiple threads using pthreads.

sleep()导致进程(所有线程)停止执行或只是我的线程调用 sleep

Is sleep() causing the process (all the threads) to stop executing or just the thread where I am calling sleep?

推荐答案

只是主题。 sleep()的POSIX文档说:


sleep()函数将导致调用线程暂停执行...

The sleep() function shall cause the calling thread to be suspended from execution...

这篇关于pthread睡眠linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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