Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我可以从外部线程异步取消与pthread_setcanceltype具有相同的效果吗?_C_Multithreading_Thread Safety_Pthreads_Kill - Fatal编程技术网

我可以从外部线程异步取消与pthread_setcanceltype具有相同的效果吗?

我可以从外部线程异步取消与pthread_setcanceltype具有相同的效果吗?,c,multithreading,thread-safety,pthreads,kill,C,Multithreading,Thread Safety,Pthreads,Kill,您是否可以从当前线程以外的其他线程调用pthread_setcanceltype with Asynchronous Cancel选项(或者是否有其他替代函数),以便在当前线程延迟激活取消选项的情况下,强制从另一个线程杀死一个线程 此外,是否仍需要知道线程是否可取消,因为对具有无限循环的线程调用pthread_cancel将返回与成功取消相同的值,即0

您是否可以从当前线程以外的其他线程调用pthread_setcanceltype with Asynchronous Cancel选项(或者是否有其他替代函数),以便在当前线程延迟激活取消选项的情况下,强制从另一个线程杀死一个线程

此外,是否仍需要知道线程是否可取消,因为对具有无限循环的线程调用pthread_cancel将返回与成功取消相同的值,即0