使用 pthread_testcancel 作为pthread_cancel 时 线程的退出点函数
来源:互联网 发布:联想yoga11软件 编辑:程序博客网 时间:2024/05/16 13:53
pthread_testcancel()--Create Cancellation Point
Syntax#include <pthread.h>void pthread_testcancel(void);Threadsafe: YesSignal Safe: NoThe pthread_testcancel() function creates a cancellation point in the calling thread. If cancelability is currently disabled, this function has no effect. For more information on cancelability, see Thread cancellation APIs.
When cancelability is disabled, all cancels are held pending in the target thread until the thread changes the cancelability. When cancelability is deferred, all cancels are held pending in the target thread until the thread changes the cancelability, calls a function that is a cancellation point, or calls pthread_testcancel(), thus creating a cancellation point. When cancelability is asynchronous, all cancels are acted upon immediately, interrupting the thread with its processing.
You should not use asynchronous thread cancellation via the PTHREAD_CANCEL_ASYNCHRONOUS option of pthread_setcanceltype(). See the common user errors section of this document for more information.
- 使用 pthread_testcancel 作为pthread_cancel 时 线程的退出点函数
- 使用 pthread_testcancel 作为pthread_cancel 时 线程的退出点函数
- pthread_cancel 完美退出线程
- 线程函数pthread_cancel
- 线程的取消pthread_cancel()函数(线程三)
- 关于线程的删除:pthread_cancel函数的替代
- 调用系统函数pthread_cancel取消进程的其他线程
- 使用pthread_cancel终止线程的填坑历程
- pthread_testcancel函数以及pthread_setcancelstate
- 嵌入式 线程退出pthread_setcanceltype以及pthread_self以及pthread_cancel
- 关于pthread_testcancel()的疑问
- 类成员函数作为线程函数使用
- pthread_cancel 进程和线程的讲解
- pthread_cancel 线程取消以及锁的释放
- pthread_cancel 线程取消以及锁的释放
- 一个 pthread_cancel 引起的线程死锁
- Linux--多线程之线程的取消pthread_cancel
- 一个 pthread_cancel 引起的线程死锁
- CSS实现将div固定在页面指定地方
- safari其实没有把内存的缓存写到存储卡上。
- oracle数据库移植到mysql数据库遇到的问题【资料整理】
- Google Protocol Buffers之Visual Studio 2005安装配置及其测试步骤[基于C++]
- 关于动态链接库占用内存的思考
- 使用 pthread_testcancel 作为pthread_cancel 时 线程的退出点函数
- ASP.NET中常用的26个优化性能方法
- Fedora 10下播放mp3和wma的有效导引
- my blog
- 输入一个偶数N,输出所有素数对之和等于N的素数对
- 只能输入整数或带小数点的数的正则表达式
- 如何关闭与恢复visual studio实时调试器
- 抽象工厂(Abstract Factory)模式
- 如何批量打印CAD圖紙?(如有小程序,請賜予)