用C ++线程模拟pthread_kill [英] Emulate pthread_kill with C++ threads

查看:126
本文介绍了用C ++线程模拟pthread_kill的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用C ++线程模拟pthread_kill()函数?我以前问过这个问题,但没有回应。线程:: native_handle()函数有帮助吗?

How can I go about emulating the pthread_kill() function with C++ threads? I asked a question about this earlier but there was no response to it. Will the thread::native_handle() function help here?

推荐答案

因此,这个问题的答案是依赖于平台相关的功能,并使用 std :: thread :: native_handle pthread_kill()

So the answer to this question is to rely on platform dependent features and use std::thread::native_handle with pthread_kill()

这篇关于用C ++线程模拟pthread_kill的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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