gpt4 book ai didi

我可以使用 pthread_kill 停止(暂停)pthread 执行吗

转载 作者:太空狗 更新时间:2023-10-29 15:36:31 27 4
gpt4 key购买 nike

如果我发送 SIGTSTP 信号,线程会停止吗?或者换句话说,它的行为是否像 SIGTSTP 和 SIGCONT 上的进程?

提前致谢。

最佳答案

来自`man 3p pthread_kill:

Note that pthread_kill() only causes the signal to be handled in the context of the given thread; the signal action (termination or stopping) affects the process as a whole.

所以我会说你将停止整个进程,而不仅仅是线程。

关于我可以使用 pthread_kill 停止(暂停)pthread 执行吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11046720/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com