Manual pthread_cancel(3) - Linux manual page 根據 linux manual 所寫,pthread_cancel 基本上可以在一些可中斷的地方(POSIX 給了一個清單,大概是 IO 操作的時候)中斷 thread。 這時就好奇了:C++ 的 Destructor 會不會被觸發?這並沒有寫在文件上。 Code #include <pthread.h> #include <unistd.h> #include <stdio.h> struct Obj ...
notes.mukyu.dev2 min readNo responses yet.